Skip to main content

Crate gate4agent

Crate gate4agent 

Source
Expand description

gate4agent — Universal wrapper for CLI agents (Claude Code, Codex, Gemini, OpenCode).

Two transport modes:

  • Pipe mode: NDJSON-streaming pipe sessions (Claude, Codex, Gemini, OpenCode)
  • PTY mirror: spawns agent in real PTY, captures raw output, vt100 parsing

All modes produce AgentEvent values on a tokio::sync::broadcast channel.

§Entry points

Re-exports§

pub use core::error::AgentError;
pub use core::types::AgentEvent;
pub use core::types::CliTool;
pub use core::types::SessionConfig;
pub use transport::SpawnOptions;
pub use transport::TransportSession;
pub use pipe::PipeSession;
pub use pipe::PipeProcessOptions;
pub use pipe::ClaudeOptions;
pub use manager::MultiCliManager;
pub use manager::ManagerConfig;
pub use manager::InstanceId;
pub use manager::InstanceMode;
pub use pty::snapshot::AgentCli;
pub use pty::snapshot::AgentRenderSnapshot;
pub use pty::snapshot::AgentSnapshotMode;
pub use pty::snapshot::BuddyArt;
pub use pty::snapshot::ChatMessage;
pub use pty::snapshot::ChatRole;
pub use pty::snapshot::TermCell;
pub use pty::snapshot::TermGrid;
pub use history::HistoryReader;
pub use history::SessionMeta;
pub use history::reader_for;

Modules§

core
Core shared types and errors for gate4agent.
history
Read-only access to CLI session history files written by the CLIs themselves.
manager
Multi-CLI agent session manager.
pipe
Pipe transport — NDJSON-streaming headless CLI sessions.
pty
PTY transport — pseudo-terminal screen-scraping for CLI agents.
transport
Transport layer — thin dispatch router for spawning CLI agent processes.