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:
@@ -112,6 +112,10 @@ class HyperBareHeadlessUi extends EventEmitter {
|
||||
}
|
||||
}
|
||||
|
||||
toJSON () {
|
||||
return this.snapshot()
|
||||
}
|
||||
|
||||
sendToUiBatch (messages) {
|
||||
if (!Array.isArray(messages)) throw new Error('messages array required')
|
||||
return messages.map((m) => this.sendToUi(m.channel, m.payload))
|
||||
|
||||
Reference in New Issue
Block a user