Expand description
IDE-protocol I3: the three write tools.
Thin MCP envelope builders over [lattice_agent::EditorAccess]’s write
half (open_file / save_document / close_tab / close_session_diffs):
marshal arguments, call the port, and shape the result. All the
validation + Effect mapping + the bus send/await/timeout lives in the
port (lattice_agent::write_bus + EditorAccess::run_write); these
functions only parse arguments and translate the port’s [AgentError]
back into the MCP reply strings the agent has always seen.
Every failure path is graceful: missing/absent bus, a dropped receiver
(server stopped), or a timeout all return success: false with a
message — never a hang, never a panic.
Functions§
- close_
all_ diff_ tabs - D-fix.6
closeAllDiffTabs: reject every programmatic diff connectionconn_idopened. Takes no args (the connection id IS the scope). - close_
tab close_tab: close the tab namedtab_name, scoped to connectionconn_id(D-fix.6) — the host rejects THAT connection’s diff session(s).- open_
file openFile: openfilePath, optionally at aselectionstart position.- save_
document saveDocument: save the document forfilePath.