Expand media, agents, applications, and messaging module APIs on main.
Adds snapshot(), batch helpers, and clearAll aliases across media-streaming (20), agents-workflows, applications-collab/economy, messaging pubsub/streams/gossip. Co-authored-by: Cursor <[email protected]>
This commit is contained in:
@@ -108,6 +108,15 @@ class HyperP2PStreamAccessControl extends EventEmitter {
|
||||
return n
|
||||
}
|
||||
|
||||
snapshot () {
|
||||
return { active: this.activeTokenCount(), total: this._tokens.size }
|
||||
}
|
||||
|
||||
grantCapabilityBatch (entries) {
|
||||
if (!Array.isArray(entries)) throw new Error('entries array required')
|
||||
return entries.map((e) => this.grantCapability(e.streamId, e.subject, e.ttlMs))
|
||||
}
|
||||
|
||||
getStats () {
|
||||
return mediaStats(this._stats, PROTOCOL, { active: this.listActive().length })
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user