Features
- DUT context for AI agents — the MCP server now understands the board, not just the bench. New
DUTContext,SubSystem, andDocRefmodels capture a device-under-test’s purpose, summary, MCU, key peripherals, and schematic/datasheet references (by URL or syncedrepo_path). Newdiscover_dut()andcite_schematic()tools andlager://dut/overview.mdresources surface it, anddiscover_bench(net)now returns the parent subsystem and relevant doc refs. Schematics are referenced, never stored — the agent fetches and analyzes them with its own tools. lager box dut show | edit | add-doc— author and inspect DUT context (subsystems, documentation references) stored in the Lager Box’sbench.json.DebugNet.session()andDebugNet.rtt_defmt(elf=...).session()is a context manager that scopes connect-on-entry and guaranteed teardown so the safe connect/disconnect ordering is encoded once.rtt_defmt()opens an RTT session and pipes it throughdefmt-print, yielding decoded log lines instead of raw bytes — so on-boxlager pythontests can assert directly on defmt-encoded firmware logs.defmt-printis now bundled in the Lager Box image.- MCP slash-command prompts (
write_lager_test,explore_bench,assess_test_feasibility) and a new “AI Agents (MCP)” documentation tab with a server overview and DUT-context guide.
Improvements
- The MCP server is now a read-only discovery & planning surface. Its purpose is to let an agent learn the bench and DUT well enough to write and run a test; execution happens in the test script via
lager python … --box <box-ip>.discover_bench/discover_dutecho the real address the client connected on and return a ready-to-run command, anddiscover_benchnow reports instrument channels, capabilities, firmware, and authored specs/ranges. - Reconnect-aware RTT and self-healing reset/read_memory on both J-Link and OpenOCD backends. The RTT reader transparently re-attaches to the same port after a socket drop (it only re-attaches to an already-running server, never starts one), and
reset/erase/read_memoryreconnect automatically when no server is running — so scripted flash → attach → reset loops no longer thrash. A DA1469x guard avoids auto-starting an unhalted server. - Simplified agent-facing net metadata to
purpose/notes/tags, replacing the overlappingdescription/dut_connection/test_hintsfields.lager nets describenow takes--purpose/--notes/--tag, and the Net Manager TUI edit dialog matches. - The MCP server auto-reloads bench config on change (it watches the mtimes of
bench.json,saved_nets.json, andbox_id), so DUT/net edits are picked up on an agent’s next request without a reload call or service restart. It also warns when a subsystem references a net that doesn’t exist.
Bug Fixes
- Debug connect no longer burns its retries when the GDB remote rejects non-stop mode. JLinkGDBServer rejects
set non-stop on, which previously exhausted all connect retries and skipped target verification and RTT control-block auto-detection. The connect now detects that specific rejection and retries once with an all-stop controller; OpenOCD keeps non-stop, and any other target error still fails loudly. lager box dut add-doc/editnow savebench.jsonwithout requiring passwordless sudo, and no longer raise aKeyErroron a Lager Box whosebench.jsonhas no DUT block.lager box dut editandlager box config editnow honor$EDITOR/$VISUALflags (e.g.subl -w,code -w,vim -p) by parsing the editor string withshlex.split()instead of treating it as a single program name.
Breaking Changes
- The MCP server no longer exposes hardware I/O or mutation tools. The
quick_io,install_dependency,run_python,pip,logs,defaults, andbinariestools, the safety/preflight engine, therun_lagerCLI passthrough, and the audit subsystem have been removed. Agents now execute tests vialager python path/to/test.py --box <box-ip>rather than over MCP. Per-bench safety constraints are now advisory metadata surfaced indiscover_bench, not enforced.

