MeshNode used to emit NATS events.
MeshGraph used to persist review state as RDF triples.
Optionalconfig: TrustReviewConfigOptional tuning parameters (threshold, TTL, subject).
A guardian approves the pending demotion. The agent is permanently
demoted to the level proposed at suspension time. Writes
mesh:reviewOutcome = "mesh:PermanentlyDemoted" plus a PROV-O activity
triple to the graph.
The agent being demoted.
DID or identifier of the approving guardian / human.
Return all agents currently suspended pending review.
Scan all pending reviews for expired TTLs and auto-demote those agents.
Call this periodically (e.g. every 60 seconds via setInterval).
An array of agentIds that were auto-demoted in this pass.
A guardian reinstates the agent at the given trust level. Writes
mesh:reviewOutcome = "mesh:Reinstated" plus a PROV-O activity triple
to the graph.
The agent being reinstated.
DID or identifier of the reviewing guardian / human.
Human-readable justification for reinstatement.
Register the ATFTrustSystem so that review outcomes (approve / reinstate / auto-expire) can mutate live trust levels.
Call this immediately after constructing both objects:
const mgr = new TrustReviewManager(node, graph);
mgr.setATFSystem(atf);
Called by the ATF system when a demotion would take an agent below the review threshold. Suspends the agent and emits a NATS event instead of applying the demotion immediately.
The agent's DID or identifier.
Human-readable explanation of why demotion is pending.
The trust level the agent would be demoted to.
true when a suspension was triggered (caller must skip immediate
demotion); false when no review is needed (apply demotion normally).
TrustReviewManager — review gate for ATF demotions.
When an agent's trust would drop below TrustReviewConfig.reviewThreshold:
mesh:TrustReviewRequiredtriple written to graph).mesh.trust.review.<agentId>.