Skip to main content

Crate brainos_terminal

Crate brainos_terminal 

Source
Expand description

§Brain Terminal Bridge

gRPC PTY motor cortex — Brain’s adapter for spawning and driving pseudo-terminal sessions across platforms (Unix openpty/forkpty, Windows ConPTY via portable-pty). Each session exposes split RPCs (Open / Close / Attach / Send / Resize / Signal) plus a bidi Interact stream for latency-critical use.

Default port: 19793.

Re-exports§

pub use error::TerminalError;
pub use graph::MirrorError;
pub use graph::TerminalGraphHandles;
pub use graph::TerminalGraphSink;
pub use server::TerminalSvc;
pub use types::SessionId;
pub use types::SessionMeta;
pub use types::TermSize;

Modules§

error
Terminal Bridge error type.
graph
Optional graph-mirror hook for the Terminal Bridge.
pb
Generated protobuf types and tonic stubs for brain.terminal.v1.
server
Tonic implementation of the brain.terminal.v1.TerminalSession service.
types
Public, non-PB types for the Terminal Bridge.

Structs§

SessionRegistry
Live PTY session registry. Holds Arc<Session> internally; the implementation-detail Session shape (master/child handles, channels) is kept crate-private. External callers can only read SessionMeta.
TerminalAuth
Authentication wiring for the Terminal Bridge. When attached, every RPC resolves a identity::Principal from request metadata (api-key) and the identity store gates the action. When absent, the bridge runs without authentication — sessions still get a None principal in SessionMeta and audit events, and no gate is enforced.
TerminalBridge
Terminal Bridge service handle.

Constants§

DEFAULT_PORT
Default gRPC bind port for the Terminal Bridge.