Expand description
lattice-agent — the editor-capability port that lattice’s agent
integrations are built on.
lattice integrates coding agents over two inverted transports: an MCP server the agent dials into (Claude Code) and an ACP client that spawns and drives the agent (opencode). Transport direction is not what the code is made of — “give me the selection”, “write this file”, “ask the user to approve this diff” mean one thing regardless of who opened the socket.
This crate owns that surface. It carries no agent wire protocol: no
agent-client-protocol, no tokio-tungstenite, no lattice-lsp. Adapters
live in lattice-ai. See docs/dev/architecture/agent-integration.md.
Re-exports§
pub use commands::parse_no_args;pub use commands::parse_rest_as_text;pub use diff_review::DiffReviewRequest;pub use diff_review::review_diff;pub use editor_access::EditorAccess;pub use editor_access::OpenEditor;pub use editor_access::SelectionInfo;pub use error::AgentError;pub use error::Result;pub use state_cache::EditorStateCache;pub use state_cache::EditorStateHandle;pub use write_bus::EditorWriteRequest;pub use write_bus::InboundKind;pub use write_bus::InboundReply;pub use write_bus::make_handler;pub use log::ai_log::AiLogEventPublisher;pub use log::ai_log::AiLogLevel;pub use log::ai_log::AiLogPushed;pub use log::ai_log::AiLogRecord;pub use log::ai_log::AiLogSource;pub use log::ai_log::AiLogger;pub use log::ai_log::LogRing;pub use log::ai_log::SessionKey;pub use log::ai_log::format_ai_log_line;pub use log::ai_log::level_tag;pub use log::buffer_names::ai_log_name;pub use log::buffer_names::parse_ai_log_name;pub use log::modes::AiLogMode;
Modules§
- commands
- Ex-command parsing helpers shared by every agent adapter.
- diff_
review - The diff-review seam: propose an edit, block until the user rules on it.
- editor_
access - AG-2a: the concrete editor-capability handle for the read surface.
- error
- Error surface for the agent capability port.
- log
- Per-process agent-log substrate (AG-3).
- state_
cache - AG-2a: the protocol-neutral editor read-state cache.
- write_
bus - IDE-protocol I3: the write-request payload + per-item handler.