Skip to main content

Crate scosh_core

Crate scosh_core 

Source
Expand description

Portable session state and terminal event semantics for scosh hosts.

The crate deliberately contains no transport, process, PTY, or terminal renderer code. Desktop and mobile adapters own those boundaries.

See the repository’s host examples for the event loop used by Apple, Android, and Rust hosts.

Re-exports§

pub use errors::ErrorCategory;
pub use errors::SdkError;
pub use events::AcknowledgeResult;
pub use events::CommitReceipt;
pub use events::SessionEvent;
pub use events::SessionStatus;
pub use events::SnapshotRequiredReason;
pub use events::TerminalEffect;
pub use input::InputId;
pub use input::InputOutcome;
pub use input::InputRequest;
pub use input::InputResult;
pub use types::Dimensions;
pub use types::PrimaryScrollRow;
pub use types::StateRevision;
pub use types::TerminalCell;
pub use types::TerminalCellStyle;
pub use types::TerminalColor;
pub use types::TerminalCursor;
pub use types::TerminalDelta;
pub use types::TerminalSnapshot;
pub use types::TerminalState;
pub use types::TerminalStateDelta;
pub use types::TerminalStateRow;

Modules§

bootstrap
Semantic bootstrap boundary for host-owned SSH adapters.
errors
Stable error categories for host adapters.
events
Host-facing events and effect acknowledgements.
input
Bounded, ordered input values for the host-to-session path.
lifecycle
Deterministic host lifecycle transitions.
recovery
Finite recovery budget shared by desktop and mobile adapters.
types
Portable, owned terminal values.

Structs§

Session
Portable state owner. Transport adapters feed snapshots/deltas and drain events; host UI code only sees owned DTOs and opaque receipts.
SessionOptions
Bounds the host event queue. Lossy state events are never silently overwritten; the caller receives ConsumerStalled and can recover with a fresh snapshot.

Enums§

CoreError
Stable, transport-neutral errors exposed by the portable core.