1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
//! Core types for Emergent messages and primitives.
//!
//! This module provides strongly-typed newtypes for all identifiers and
//! domain values used in the Emergent system.
//!
//! # TypeID Identifiers
//!
//! These types use the TypeID format (`prefix_<uuid_v7>`) for unique,
//! time-sortable, and self-describing identifiers:
//!
//! - [`MessageId`] - Unique message identifier (`msg_<uuid_v7>`)
//! - [`CorrelationId`] - Request-response tracking (`cor_<uuid_v7>`)
//! - [`CausationId`] - Causation chain tracking (`cau_<uuid_v7>` or `msg_<uuid_v7>`)
//!
//! # Value Objects
//!
//! These types provide validation and type safety for domain values:
//!
//! - [`MessageType`] - Validated message type (e.g., "timer.tick")
//! - [`PrimitiveName`] - Validated primitive name (e.g., "timer_source")
//! - [`Timestamp`] - Milliseconds since Unix epoch
//!
//! # System Event Payloads
//!
//! Typed payloads for system lifecycle events:
//!
//! - [`SystemEventPayload`] - Payload for `system.started.*`, `system.stopped.*`, `system.error.*`
//! - [`SystemShutdownPayload`] - Payload for `system.shutdown`
//!
//! # Example
//!
//! ```rust
//! use emergent_client::types::{MessageId, MessageType, PrimitiveName, Timestamp};
//!
//! // Create typed identifiers
//! let id = MessageId::new();
//! let msg_type = MessageType::new("timer.tick").expect("valid type");
//! let name = PrimitiveName::new("timer").expect("valid name");
//! let ts = Timestamp::now();
//!
//! // Types are self-describing and serializable
//! assert!(id.to_string().starts_with("msg_"));
//! assert_eq!(msg_type.as_str(), "timer.tick");
//! ```
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use Timestamp;