Skip to main content

Module writes

Module writes 

Source
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 connection conn_id opened. Takes no args (the connection id IS the scope).
close_tab
close_tab: close the tab named tab_name, scoped to connection conn_id (D-fix.6) — the host rejects THAT connection’s diff session(s).
open_file
openFile: open filePath, optionally at a selection start position.
save_document
saveDocument: save the document for filePath.