Expand description
AG-2a: the concrete editor-capability handle for the read surface.
EditorAccess composes generic services — the crate-owned
[EditorStateCache] and the generic BufferStore (on-demand text /
dirty) — into Rust-typed answers for current_selection /
open_editors / workspace_folders / document_dirty. It carries no
wire-protocol shape (no JSON, no MCP envelope): that translation is each
adapter’s job (lattice_ai::mcp::reads, and lattice-ai’s ACP
mapping).
Not a trait — one implementation exists. Tests construct it over
in-memory seams (an EditorStateCache built directly from events),
mirroring the pre-port ctx_with test helper.
Structs§
- Editor
Access - The concrete editor-capability handle. Clone-able (all fields are cheap handles), shared between agent tasks off the editor thread.
- Open
Editor - Selection
Info - The active selection plus the text it covers.
Functions§
- ordered
(start, end)in document order. Used by adapters building a selection result (lattice_ai::mcp::reads::selection_result) as well as internally by [slice_selection].- path_
to_ uri - A
file://URI forpath. Used by adapters building a selection result (lattice_ai::mcp::reads::selection_result) alongsidefile_path.