Expand description
§Reputation Types
Core data types for the MCP agent reputation system.
This crate provides the fundamental data structures used throughout the reputation system, including agent data, reputation scores, and a builder for constructing agent instances.
§Key Types
AgentData
: Represents an MCP agent with all reputation-relevant dataReputationScore
: The calculated reputation score with confidenceAgentDataBuilder
: Fluent builder for constructingAgentData
§Examples
§Creating Agent Data
use reputation_types::{AgentData, AgentDataBuilder};
// Using the builder (recommended)
let agent = AgentDataBuilder::new("did:example:123")
.total_interactions(150)
.with_reviews(100, 4.5)
.mcp_level(2)
.identity_verified(true)
.build()
.unwrap();
// Or use the convenience method
let agent = AgentData::builder("did:example:456")
.total_interactions(60)
.with_reviews(50, 3.8)
.build()
.unwrap();
Structs§
- Agent
Data - Represents an MCP agent with all reputation-relevant data
- Agent
Data Builder - Builder for constructing
AgentData
instances with a fluent API. - Prior
Breakdown - Breakdown of prior score components
- Reputation
Score - The calculated reputation score for an agent
- Score
Components - Detailed breakdown of score components
Enums§
- Builder
Error - Errors that can occur when building AgentData
- Confidence
Level - Confidence level categorization based on confidence value