Add toJSON() serialization helpers across all module categories on main.

Fourth pass: toJSON() delegates to snapshot() (or exportSnapshot/stateSnapshot) for JSON export and logging across agents, applications, consensus, core, encoding, experimental, indexes, media, messaging, network, observability, pear-platform, routing, scheduling, storage, supercomputer, trust, measurement, oracles, and time-ordering modules.

Co-authored-by: Cursor <[email protected]>
This commit is contained in:
Raven Scott
2026-05-21 04:22:54 -04:00
co-authored by Cursor
parent 2a7812ddbb
commit 3af23c0d34
182 changed files with 728 additions and 0 deletions
@@ -106,6 +106,10 @@ class HyperBareTargetMatrix extends EventEmitter {
return { host: this.host, targets: this.targetCount() }
}
toJSON () {
return this.snapshot()
}
addTargetBatch (entries) {
if (!Array.isArray(entries)) throw new Error('entries array required')
return entries.map((e) => this.addTarget(e.os, e.arch, e.extra || {}))