Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/aegis-runtime-mv/blob/main/src/events/envelope.rs # aegis-runtime-mv Native Rust agent runtime: Axum WebSocket/SSE/REST gateway, heartbeat scheduler, dependency-aware task workflow, SQLite storage. Attachment of AienOS. Pre-alpha. Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `aegis-runtime-mv / src / events / envelope.rs` 32 lines ยท 737 bytes Raw Blame History 1 use super::event::AegisEvent; 2 use super::id::EventId; 3 use chrono::Utc; 4 use serde::{Deserialize, Serialize}; 5 6 #[derive(Debug, Clone, Serialize, Deserialize)] 7 pub struct EventEnvelope { 8 pub event_id: EventId, 9 pub session_id: Option, 10 pub run_id: Option, 11 pub sequence: u64, 12 pub timestamp: i64, 13 pub event: AegisEvent, 14 } 15 16 impl EventEnvelope { 17 pub fn new( 18 event: AegisEvent, 19 session_id: Option, 20 run_id: Option, 21 sequence: u64, 22 ) -> Self { 23 Self { 24 event_id: EventId::new(), 25 session_id, 26 run_id, 27 sequence, 28 timestamp: Utc::now().timestamp_millis(), 29 event, 30 } 31 } 32 }