Serialize to the full JSON-compatible representation.
(&self)
| 175 | |
| 176 | /// Serialize to the full JSON-compatible representation. |
| 177 | pub fn to_serialized_graph(&self) -> SerializedGraph { |
| 178 | SerializedGraph { |
| 179 | version: SerializedGraph::VERSION, |
| 180 | session_id: self.session_id.clone(), |
| 181 | created_at: chrono::Utc::now().timestamp_millis(), |
| 182 | nodes: self.nodes.clone(), |
| 183 | edges: self.edges.clone(), |
| 184 | stats: self.stats.clone(), |
| 185 | counter: self.counter, |
| 186 | current_goal: self.current_goal.clone(), |
| 187 | pending_explorations: self.pending_explorations.clone(), |
| 188 | last_commitment: self.last_commitment.clone(), |
| 189 | last_node: self.last_node.clone(), |
| 190 | pending_human_gate: self.pending_human_gate.clone(), |
| 191 | last_provenance_hash: self.last_provenance_hash.clone(), |
| 192 | nodes_saved_count: Some(self.nodes_saved_count), |
| 193 | edges_saved_count: Some(self.edges_saved_count), |
| 194 | } |
| 195 | } |
| 196 | |
| 197 | /// Serialize to a compact text summary for LLM compaction context. |
| 198 | /// |