MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / set_agent_epoch

Method set_agent_epoch

atomic-remote/src/storage.rs:503–506  ·  view source on GitHub ↗

Bump an agent's epoch: every grant issued to it before now is dead. The only mechanism that reaches grants the server has never seen — which is most of them, since grants are presented rather than registered. Use it whenever a narrowing or a withdrawal has to take effect immediately rather than when certificates happen to expire.

(&self, agent_id: &str)

Source from the content-addressed store, hash-verified

501 /// it whenever a narrowing or a withdrawal has to take effect immediately
502 /// rather than when certificates happen to expire.
503 pub async fn set_agent_epoch(&self, agent_id: &str) -> Result<EpochInfo, RemoteError> {
504 self.post_empty(&format!("/identities/agents/{agent_id}/epoch"))
505 .await
506 }
507
508 /// Clear an agent's epoch, bringing unexpired grants back.
509 pub async fn clear_agent_epoch(&self, agent_id: &str) -> Result<(), RemoteError> {

Callers 1

bump_epochMethod · 0.80

Calls 1

post_emptyMethod · 0.80

Tested by

no test coverage detected