Observer embryo, Maestro done

This commit is contained in:
STEINNI
2026-06-13 13:47:46 +00:00
parent 327efdbe9a
commit e81a5b573b
46 changed files with 1929 additions and 143 deletions
+23
View File
@@ -0,0 +1,23 @@
export const SimState = {
IDLE: 'idle',
PREPARE: 'prepare',
LIVE: 'live',
}
export function validateAgentSets(expected, found) {
if(!Array.isArray(expected) || !Array.isArray(found)) {
return('agentIds must be arrays')
}
const exp = new Set(expected)
const fnd = new Set(found)
if(exp.size !== fnd.size) {
return(`Agent count mismatch: expected ${exp.size}, found ${fnd.size}`)
}
for(const id of exp) {
if(!fnd.has(id)) return(`Missing agent: ${id}`)
}
for(const id of fnd) {
if(!exp.has(id)) return(`Unexpected agent: ${id}`)
}
return(null)
}