#![forbid(unsafe_code)]
#![warn(missing_docs)]
pub mod channel;
pub mod event;
pub mod note;
pub mod registry;
use onemessagebus::{Reserved, Vocabulary};
pub use event::{
AgentEnvelope, AgentFilter, ArtifactRef, Dimensions, Emitter, Envelope, EventFilter, Labels,
MatchFields, Matcher, Merge, Phase, Reader, Source,
};
pub use note::Undelivered as NoteUndelivered;
pub use registry::{registry, EVENT_ENVELOPE_FAMILY, REPLY_ENVELOPE_FAMILY};
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub struct Agent;
pub const RESERVED_LABELS: &[Reserved] = &[
Reserved::text("run_id"),
Reserved::integer("round"),
Reserved::text("node"),
Reserved::text("step"),
Reserved::text("member"),
Reserved::text("persona"),
];
pub const DIMENSIONS: &[Reserved] = &[Reserved::word("phase")];
impl Vocabulary for Agent {
type Source = Source;
type Dimensions = Dimensions;
type Labels = Labels;
type Fields = MatchFields;
const NAME: &'static str = "agent";
const RESERVED: &'static [Reserved] = RESERVED_LABELS;
const DIMENSIONS: &'static [Reserved] = DIMENSIONS;
const DEFAULT_SOURCE: &'static str = "pipeline";
fn write_version(source: &Self::Source) -> u32 {
match source {
Source::Agentgraph | Source::Vcs => 1,
Source::Pipeline => 2,
}
}
}
#[doc = include_str!("../README.md")]
#[cfg(doctest)]
pub struct ReadmeDoctests;