agentctl 0.1.0

Tiny control-plane primitives for AI agents.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//! agentctl: minimal control-plane primitives for AI agents.

/// A trivial agent identifier.
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub struct AgentId(pub String);

impl AgentId {
    /// Creates a new agent identifier, validating it is non-empty.
    pub fn new<S: Into<String>>(s: S) -> Result<Self, &'static str> {
        let id = s.into();
        if id.trim().is_empty() {
            Err("AgentId cannot be empty")
        } else {
            Ok(Self(id))
        }
    }
}