Public declaration syntax from harness-sdk/src/session/record.rs Original source SHA-256: c59bd13fe13606139d566ac60066eb8d32642454ebce41f4c99d9f968b27b35a Function bodies and constant values are omitted. This is not the complete implementation. Source line 28 #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] #[serde(rename_all = "snake_case")] pub enum SessionRecordKind { /// User input. User, /// Assistant turn (markdown body). Assistant, /// Tool invocation. Tool, /// Shell exec. Exec, /// Unified diff. Diff, /// Approval request + resolution. Approval, /// System notice. System, /// Adapter-supplied opaque state (config, model id, tokens). Snapshot, } Source line 54 #[derive(Debug, Clone, Serialize, Deserialize)] pub struct SessionRecord { /// Per-record id (independent of session id; useful for dedup /// when resume crosses fork boundaries). pub id: Uuid, /// UTC timestamp when the record was written. pub at: DateTime, /// Discriminator. pub kind: SessionRecordKind, /// Optional sender label (agent id, user, system). #[serde(default)] pub sender: String, /// Structured payload — schema is owned by the SDK consumer. pub body: serde_json::Value } Source line 73 #[must_use] pub fn new( kind: SessionRecordKind, sender: impl Into, body: serde_json::Value, ) -> Self;