#![cfg_attr(test, allow(clippy::panic))]
#[cfg(target_arch = "wasm32")]
pub mod tokio {
pub use tokio_with_wasm::alias::*;
}
pub mod identity;
pub mod inbox;
pub mod inproc;
pub mod peer_meta;
pub mod transport;
pub mod trust;
pub mod types;
#[cfg(not(target_arch = "wasm32"))]
pub mod host_acceptor;
#[cfg(not(target_arch = "wasm32"))]
pub mod io_task;
#[cfg(not(target_arch = "wasm32"))]
pub mod plain_listener;
pub mod agent;
pub(crate) mod classify;
pub mod event_injector;
pub mod mcp;
pub(crate) mod peer_types;
pub mod router;
pub mod runtime;
pub use event_injector::CommsEventInjector;
#[cfg(not(target_arch = "wasm32"))]
pub use host_acceptor::{
HostAcceptorBounds, HostAcceptorConfig, HostAcceptorError, HostAcceptorHandle,
HostAcceptorIdentityRegistry, HostAcceptorIdentityReplacementReservation,
HostAcceptorRegistrationMaterial, HostPairingConfig, PairingRateLimit, spawn_host_acceptor,
};
pub use identity::{IdentityError, Keypair, PubKey, Signature};
pub use inbox::{AdmissionOutcome, DropReason, Inbox, InboxError, InboxSender};
pub use inproc::{
InprocPeerInfo, InprocPublicationError, InprocRegistry, InprocSendError, RegistrationOutcome,
RegistrationRejection,
};
#[cfg(not(target_arch = "wasm32"))]
pub use io_task::{IoTaskError, handle_connection};
pub use peer_meta::PeerMeta;
#[cfg(not(target_arch = "wasm32"))]
pub use plain_listener::{PlainIngressFault, PlainIngressFaults, handle_plain_connection};
pub use router::{
CommsConfig, DEFAULT_MAX_MESSAGE_BYTES, DeclaredReplyEndpoint, Router, SendError,
};
#[cfg(not(target_arch = "wasm32"))]
pub use transport::codec::{EnvelopeFrame, TransportCodec};
pub use transport::{PeerAddr, TransportError};
pub use trust::{TrustEntry, TrustError, TrustResolveError, TrustStore, TrustedPeersView};
pub use types::{Envelope, InboxItem, MessageKind, SenderContentTaint, Status};
pub use runtime::comms_bootstrap::{
CommsAdvertise, CommsBootstrap, CommsBootstrapError, CommsBootstrapMode, ParentCommsContext,
PreparedComms,
};
pub use runtime::comms_config::CoreCommsConfig;
#[cfg(not(target_arch = "wasm32"))]
pub use runtime::comms_config::ResolvedCommsConfig;
pub use runtime::comms_runtime::{
CommsRuntime, CommsRuntimeError, CommsToolMaterial, PeerRequestResponseAuthority,
PreparedCommsRuntime,
};
#[cfg(not(target_arch = "wasm32"))]
pub use runtime::comms_runtime::{constant_time_str_eq, validate_pairing_secret};
pub use agent::dispatcher::{
CommsToolDispatcher, DynCommsToolDispatcher, NoOpDispatcher, comms_tool_defs,
};
pub use mcp::tools::{
RuntimeCommsCommandHandle, ToolContext, comms_tool_unavailable_reason, handle_tools_call,
handle_tools_call_with_context, tools_list,
};
inventory::submit! {
meerkat_capabilities::CapabilityRegistration {
id: meerkat_capabilities::CapabilityId::Comms,
description: "Inter-agent communication: send, request, response, list peers + keep-alive",
scope: meerkat_capabilities::CapabilityScope::Universal,
requires_feature: Some("comms"),
prerequisites: &[],
status_resolver: Some(|_| {
if cfg!(feature = "capability") {
meerkat_capabilities::CapabilityStatus::Available
} else {
meerkat_capabilities::CapabilityStatus::NotCompiled {
feature: "comms".into(),
}
}
}),
}
}
inventory::submit! {
meerkat_skills::SkillRegistration {
id: "multi-agent-comms",
name: "Multi-Agent Comms",
description: "Setting up keep-alive, peer trust, send vs request/response patterns",
scope: meerkat_core::skills::SkillScope::Builtin,
requires_capabilities: &["comms"],
body: include_str!("../skills/multi-agent-comms/SKILL.md"),
extensions: &[],
}
}
inventory::submit! {
meerkat_skills::SkillRegistration {
id: "mob-communication",
name: "Mob Communication",
description: "How to communicate with peers in a collaborative mob",
scope: meerkat_core::skills::SkillScope::Builtin,
requires_capabilities: &["comms"],
body: include_str!("../skills/mob-communication/SKILL.md"),
extensions: &[],
}
}
#[doc(hidden)]
pub fn link_embedded_skill_registrations() {}
pub fn validate_keep_alive(requested: bool) -> Result<bool, String> {
Ok(requested)
}