brokkr-models::models::agent_generator_registrations
Rust
Agent Generator Registration Module
Subscription join table between agents and generators.
An agent must be registered with a generator before any of that generator’s
stacks can be targeted at it. Agents opt in; the broker enforces the check
in authorize_target_mutation.
Structs
Section titled “Structs”struct AgentGeneratorRegistration
Section titled “struct AgentGeneratorRegistration”pub
Derives: Queryable, Selectable, Identifiable, Debug, Clone, Serialize, Deserialize, Eq, PartialEq, Hash, ToSchema
A registration linking an agent to a generator scope.
Fields
Section titled “Fields”| Name | Type | Description |
|---|---|---|
id |
Uuid |
|
agent_id |
Uuid |
|
generator_id |
Uuid |
|
registered_at |
DateTime<Utc> |
struct NewAgentGeneratorRegistration
Section titled “struct NewAgentGeneratorRegistration”pub
Derives: Insertable, Debug, Clone, Serialize, Deserialize, ToSchema
Data required to insert a new registration.
Fields
Section titled “Fields”| Name | Type | Description |
|---|---|---|
agent_id |
Uuid |
|
generator_id |
Uuid |
Methods
Section titled “Methods”pub
fn new(agent_id: Uuid, generator_id: Uuid) -> Result<Self, String>Source
pub fn new(agent_id: Uuid, generator_id: Uuid) -> Result<Self, String> { if agent_id.is_nil() { return Err("Invalid agent ID".to_string()); } if generator_id.is_nil() { return Err("Invalid generator ID".to_string()); } Ok(NewAgentGeneratorRegistration { agent_id, generator_id, }) }