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.TerminalSessionservice. - types
- Public, non-PB types for the Terminal Bridge.
Structs§
- Session
Registry - Live PTY session registry. Holds
Arc<Session>internally; the implementation-detailSessionshape (master/child handles, channels) is kept crate-private. External callers can only readSessionMeta. - Terminal
Auth - Authentication wiring for the Terminal Bridge. When attached, every RPC
resolves a
identity::Principalfrom request metadata (api-key) and the identity store gates the action. When absent, the bridge runs without authentication — sessions still get aNoneprincipal inSessionMetaand audit events, and no gate is enforced. - Terminal
Bridge - Terminal Bridge service handle.
Constants§
- DEFAULT_
PORT - Default gRPC bind port for the Terminal Bridge.