agent_stream_kit/
registry.rs

1use crate::{AgentDefinition, ASKit};
2
3/// Registration entry emitted by the `#[askit_agent]` macro.
4pub struct AgentRegistration {
5    pub build: fn() -> AgentDefinition,
6}
7
8inventory::collect!(AgentRegistration);
9
10/// Register all agents collected via the `#[askit_agent]` macro.
11pub fn register_inventory_agents(askit: &ASKit) {
12    for reg in inventory::iter::<AgentRegistration> {
13        askit.register_agent_definiton((reg.build)());
14    }
15}