Skip to main content

PtyConfigSnapshot

Type Alias PtyConfigSnapshot 

Source
pub type PtyConfigSnapshot = PtyConfig;
Expand description

Cheap clone of PtyConfig for snapshot reads.

Aliased Type§

pub struct PtyConfigSnapshot {
    pub enabled: bool,
    pub default_shell: String,
    pub max_sessions: u32,
    pub idle_timeout_secs: u64,
    pub max_lifetime_secs: u64,
    pub allowed_shells: Vec<String>,
    pub working_directory: Option<PathBuf>,
    pub initial_size: PtySize,
    pub extra_env: BTreeMap<String, String>,
    pub env_strip_prefixes: Vec<String>,
}

Fields§

§enabled: bool

Master switch. Default false (RFC-038 §17 rollout).

§default_shell: String

Default shell invoked when the client omits shell in the open frame. Resolution order at runtime: $SHELL env, then default_shell, then /bin/zsh, then /bin/bash.

§max_sessions: u32

Hard cap on concurrent PTY sessions per principal.

§idle_timeout_secs: u64

Idle timeout in seconds. Resets on every input frame from the client.

§max_lifetime_secs: u64

Hard lifetime in seconds. After this, the session is killed regardless of activity.

§allowed_shells: Vec<String>

Optional allowlist of shells. Empty = only default_shell allowed. Enforced via AccessGate (RFC-038 §7.2).

§working_directory: Option<PathBuf>

Optional working directory override. Empty = inherit daemon cwd.

§initial_size: PtySize

Initial PTY size when the client doesn’t send one.

§extra_env: BTreeMap<String, String>

Environment variables added on top of the inherited env. TERM=xterm-256color is always set unconditionally.

§env_strip_prefixes: Vec<String>

Env var name prefixes stripped from the inherited env before exec (RFC-038 §7.5). Defaults to daemon-secret prefixes.