sync_from_disk
Reload an open KiCad board from disk after an external file-based tool writes it. It refuses when unsaved work may exist unless discard_unsaved=true; schematics require manual reload.
Instructions
After a file-based tool (kct) wrote a board that is open in KiCad, reload the editor from the file. Refuses, changing nothing, if the editor may hold unsaved work: dirty or unknown (KiCad 10 has no dirty query) unless discard_unsaved=true. The board counts as clean only when openkonnect reads the editor's content now and it equals the file now (byte-identical, or on KiCad 10.0.7 equal token for token apart from KiCad's known save formatting); no hash you pass can prove it clean. editor_hash (editor_sha256 from save_before_external_write) lets openkonnect detect an edit made in KiCad since (document_dirty); unchanged, it stays unknown. expected_hash (the file hash after your tool wrote it) refuses an unexpected write with stale_input. The reload is not an undo step. The schematic cannot be reloaded over KiCad 10's API: it is reported as manual_reload_required.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| documents | No | ||
| editor_hash | No | ||
| expected_hash | No | ||
| discard_unsaved | No |