claude-code: drop what was removed while away, render one at a time, refuse an empty settings set

Review of the nox-mesh plugin: a watch hands over what is there, not what
went, so the view is pruned to the state's keys before it starts; the
watches and the tools render one at a time, as the home's record is read
and written whole; the register answer names how an item is offered.
This commit is contained in:
jochen
2026-10-05 14:25:10 +02:00
parent dd1035a27d
commit 1d8f1ceff8
5 changed files with 70 additions and 2 deletions
@@ -104,9 +104,15 @@ func Registered(p Paths) Servers {
return s
}
var renderMu sync.Mutex
// RenderNow writes the managed directory from the facts, the settings, the licence held and the servers
// registered here.
func RenderNow(p Paths, write WriteManaged) ([]string, error) {
// One at a time: the watches and the tools all render, and the home's record of what was placed is
// read and written whole.
renderMu.Lock()
defer renderMu.Unlock()
var facts Facts
if !readJSON(p.Facts, &facts) || facts.Console == "" {
return nil, fmt.Errorf("the mesh has not rendered %s yet; nothing to write", p.Facts)