Skip to content

vox-terminal-core API Reference (generated)

Crate: vox-terminal-core · Version: 0.6.0 · Target: Library (lib.rs)

UI-agnostic terminal+agent engine shared by vox-term (ratatui TUI) and the Axis GUI Console.

UI-agnostic terminal + agent engine. Front-ends (ratatui TUI, GUI Console) render its blocks/events and submit input back. Adapts vox-orchestrator; never reimplements the agent loop.

ModuleKey types / fns
blockBlock, BlockId, BlockKind, BlockStatus, Stream
inputInputIntent, classify()
osc633Osc633Parser, Osc633Event, decode_command()
ptyspawn_pty(), PtyHandle, ShellBackend, default_shell()
sessionSession, SessionEvent
transcriptTranscriptEvent, TranscriptKind, JournalSink
agenttranslate_event(), AgentAdapterConfig
vox_interpeval_line()
FeatureDefault / Enables
default—
vox-lang—
DependencyKind
vox-compilerNormal
vox-journalNormal
vox-orchestratorNormal
vox-redactNormal
ModuleDescription
agent—
block—
commands—
corpus—
daemon_host—
host—
input—
osc633—
pty—
session—
transcript—
vox_interp—
ConstantDescription
CRATE_NAME—
Dependency Topology, diagram 18 nodes, 7 edges: vox-terminal-core → vox-compiler; vox-terminal-core → vox-journal; vox-terminal-core → vox-orchestrator; vox-terminal-core → vox-redact; vox-gui → vox-terminal-core; vox-orchestrator-d → vox-terminal-core; vox-term → vox-terminal-corevox-terminal-corevox-compilervox-journalvox-orchestratorvox-redactvox-guivox-orchestrator-dvox-term
Diagram source
graph {
direction: right
node vox_terminal_core: "vox-terminal-core"
node vox_compiler: "vox-compiler"
vox_terminal_core -> vox_compiler
node vox_journal: "vox-journal"
vox_terminal_core -> vox_journal
node vox_orchestrator: "vox-orchestrator"
vox_terminal_core -> vox_orchestrator
node vox_redact: "vox-redact"
vox_terminal_core -> vox_redact
node vox_gui: "vox-gui"
vox_gui -> vox_terminal_core
node vox_orchestrator_d: "vox-orchestrator-d"
vox_orchestrator_d -> vox_terminal_core
node vox_term: "vox-term"
vox_term -> vox_terminal_core
}
Consumer CrateRole
vox-guiDirect workspace dependent
vox-orchestrator-dDirect workspace dependent
vox-termDirect workspace dependent
KindSymbolSignatureSourceDescription
structagent::AgentAdapterConfigpub struct AgentAdapterConfigcrates/vox-terminal-core/src/agent.rs#L22-L24Config for the adapter. agent_id = Some(id) filters events to one agent; None passes through all agents (useful for single-agent sessions).
structagent::RoutedAgentTurnpub struct RoutedAgentTurncrates/vox-terminal-core/src/agent.rs#L28-L39Structured model routing decision for a terminal agent turn (?prompt or /ai prompt).
fnagent::summarypub fn summary(&self) -> Stringcrates/vox-terminal-core/src/agent.rs#L42-L53—
fnagent::route_agent_promptpub fn route_agent_prompt(prompt: &str) -> RoutedAgentTurncrates/vox-terminal-core/src/agent.rs#L58-L158Intelligently classify a terminal prompt and select the optimal model via vox_orchestrator::models::select_with_default_registry.
fnagent::translate_eventpub fn translate_event(ev: &AgentEvent, cfg: &AgentAdapterConfig) -> Option<SessionEvent>crates/vox-terminal-core/src/agent.rs#L163-L179Pure translation function — maps one AgentEvent → SessionEvent or None. Exposed as pub so tests can call it directly without a live orchestrator.
structblock::BlockIdpub struct BlockId(pub u64)crates/vox-terminal-core/src/block.rs#L4—
enumblock::BlockKindpub enum BlockKindcrates/vox-terminal-core/src/block.rs#L7-L13—
enumblock::BlockStatuspub enum BlockStatuscrates/vox-terminal-core/src/block.rs#L16-L21—
enumblock::Streampub enum Streamcrates/vox-terminal-core/src/block.rs#L24-L28—
structblock::OutputChunkpub struct OutputChunkcrates/vox-terminal-core/src/block.rs#L31-L34—
fnblock::textpub fn text(stream: Stream, s: impl Into<String>) -> Selfcrates/vox-terminal-core/src/block.rs#L37-L42—
enumblock::BlockOriginpub enum BlockOrigincrates/vox-terminal-core/src/block.rs#L47-L54—
structblock::Blockpub struct Blockcrates/vox-terminal-core/src/block.rs#L57-L66—
fnblock::newpub fn new(id: BlockId, kind: BlockKind, input: impl Into<String>) -> Selfcrates/vox-terminal-core/src/block.rs#L69-L79—
fnblock::with_originpub fn with_origin(mut self, origin: BlockOrigin) -> Selfcrates/vox-terminal-core/src/block.rs#L81-L84—
fnblock::pushpub fn push(&mut self, c: OutputChunk)crates/vox-terminal-core/src/block.rs#L86-L88—
fnblock::finishpub fn finish(&mut self, exit: i32)crates/vox-terminal-core/src/block.rs#L90-L97—
fnblock::plain_outputpub fn plain_output(&self) -> Stringcrates/vox-terminal-core/src/block.rs#L101-L104Text projection for agent context + transcript: output with ANSI/VT escapes stripped. Visual rendering is the front-end’s responsibility.
typecommands::CommandFnpub type CommandFn = fn(args: &str) -> CommandResultcrates/vox-terminal-core/src/commands.rs#L9A registered slash-command handler (pure function, no side-effects on registry).
enumcommands::CommandResultpub enum CommandResultcrates/vox-terminal-core/src/commands.rs#L13-L20Outcome of executing a slash-command.
structcommands::CommandEntrypub struct CommandEntrycrates/vox-terminal-core/src/commands.rs#L24-L28A registered command entry.
structcommands::CommandRegistrypub struct CommandRegistrycrates/vox-terminal-core/src/commands.rs#L31-L33Registry mapping /name → [CommandEntry].
fncommands::newpub fn new() -> Selfcrates/vox-terminal-core/src/commands.rs#L37-L41Creates a new, empty registry.
fncommands::registerpub fn register(&mut self, entry: CommandEntry)crates/vox-terminal-core/src/commands.rs#L44-L49Registers a command. Panics if a duplicate name is inserted (config error).
fncommands::dispatchpub fn dispatch(&self, input: &str) -> CommandResultcrates/vox-terminal-core/src/commands.rs#L52-L60Dispatches /name [args] to the matching handler.
fncommands::entriespub fn entries(&self) -> Vec<&CommandEntry>crates/vox-terminal-core/src/commands.rs#L63-L67Returns all entries, sorted by name.
structdaemon_host::DaemonHostpub struct DaemonHostcrates/vox-terminal-core/src/daemon_host.rs#L28-L30—
fndaemon_host::newpub fn new(client: OrchDaemonClient) -> Selfcrates/vox-terminal-core/src/daemon_host.rs#L33-L35—
fndaemon_host::resolve_session_hostpub async fn resolve_session_host(crates/vox-terminal-core/src/daemon_host.rs#L99Probe vox-orchestrator-d with a 250ms timeout (auto-spawning it on cold start when available) and return a [DaemonHost] when reachable, or fall back to an in-process [crate::host::LocalHost].
typehost::SessionIdpub type SessionId = Stringcrates/vox-terminal-core/src/host.rs#L21—
structhost::OpenSpecpub struct OpenSpeccrates/vox-terminal-core/src/host.rs#L24-L28—
enumhost::TermSecurityLevelpub enum TermSecurityLevelcrates/vox-terminal-core/src/host.rs#L53-L65—
fnhost::allows_agent_commandpub fn allows_agent_command(&self, cmd: &str) -> Result<(), String>crates/vox-terminal-core/src/host.rs#L76-L145Validate whether an agent-issued command is allowed under this security level.
enumhost::TermControlModepub enum TermControlModecrates/vox-terminal-core/src/host.rs#L150-L155—
structhost::SessionInfopub struct SessionInfocrates/vox-terminal-core/src/host.rs#L158-L165—
structhost::RedactedBlockContextpub struct RedactedBlockContextcrates/vox-terminal-core/src/host.rs#L169-L175Redacted projection of a completed/open terminal [Block] safe for LLM chat context.
structhost::OutputFramepub struct OutputFramecrates/vox-terminal-core/src/host.rs#L184-L187One chunk of raw PTY output. seq is 1-based and gap-free per session; a receiver that sees a gap (broadcast lag) should re-attach.
structhost::Attachmentpub struct Attachmentcrates/vox-terminal-core/src/host.rs#L193-L201Everything a front-end needs to join a live session: structured blocks, the recent raw bytes (re-parsed by its own VT engine so full-screen programs redraw), and both live streams. All taken under one lock, so no event or byte falls between the snapshot and the first received frame.
traithost::SessionHostpub trait SessionHost: Send + Synccrates/vox-terminal-core/src/host.rs#L205-L213What a front-end needs from a terminal session host, local or remote.
structhost::LocalHostpub struct LocalHostcrates/vox-terminal-core/src/host.rs#L291-L295—
fnhost::with_replay_cappub fn with_replay_cap(replay_cap: usize) -> Selfcrates/vox-terminal-core/src/host.rs#L304-L310—
fnhost::openpub async fn open(&self, spec: OpenSpec) -> Result<SessionId>crates/vox-terminal-core/src/host.rs#L321-L339Spawn a PTY running the configured or default shell and start pumping its bytes into a new Session. Must be called inside a tokio runtime.
fnhost::listpub fn list(&self) -> Vec<SessionInfo>crates/vox-terminal-core/src/host.rs#L341-L353—
fnhost::set_security_levelpub fn set_security_level(&self, id: &str, level: TermSecurityLevel) -> Result<()>crates/vox-terminal-core/src/host.rs#L355-L359—
fnhost::security_levelpub fn security_level(&self, id: &str) -> Result<TermSecurityLevel>crates/vox-terminal-core/src/host.rs#L361-L364—