Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions architecture/gateway.md
Original file line number Diff line number Diff line change
Expand Up @@ -792,6 +792,26 @@ alone — instead an unanswered keepalive on a wedged or orphaned relay closes t
channel and returns the exec with an error. Once a command reports its exit
status, the gateway also bounds how long it waits for the trailing channel close.

Interactive exec treats normal request-stream EOF as the end of stdin and resize
input. The gateway sends SSH EOF while keeping the output channel open until
command completion. Input errors terminate the operation rather than masquerading
as normal EOF. The input and output pumps are owned by the exec operation, so
timeout or response abandonment cannot leave a detached stdin task behind.
The pumps share polling fairly, and request processing yields cooperatively even
for ignored resize messages, so sustained input cannot monopolize the operation.

Go and TypeScript interactive-exec helpers distinguish process exit from stream
completion. They consume the final gRPC status before reporting success and retain
an observed exit code if transport completion fails. Callers must drain output
concurrently with waiting for completion.

TypeScript starts interactive exec eagerly and uses a bounded output queue between
the background receiver and the consumer. Cancellation wakes a receiver blocked
on that queue. Go exposes input closure through an optional session capability,
preserving the original interface for existing implementations. TypeScript also
preserves its original session interface; SDK-created sessions expose lifecycle
controls through an extended interface.

`ForwardTcp` is the client-facing byte stream for SSH and service forwarding.
The first frame is a `TcpForwardInit` that carries the sandbox ID, an
authorization token from `CreateSshSession`, and an explicit target:
Expand Down
Loading
Loading