MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / resolve_human_gate

Method resolve_human_gate

atomic-agent/src/provenance/accumulator/append.rs:300–314  ·  view source on GitHub ↗

Mark a human gate as resolved. Updates the gate node's detail and clears the pending gate state. The next node appended after this will get a `ResumedAfter` edge from the goal (if any), since the gate is cleared by `append_goal`.

(&mut self, gate_id: &str)

Source from the content-addressed store, hash-verified

298 /// The next node appended after this will get a `ResumedAfter` edge
299 /// from the goal (if any), since the gate is cleared by `append_goal`.
300 pub fn resolve_human_gate(&mut self, gate_id: &str) {
301 // Update the node's detail to mark it resolved
302 if let Some(node) = self.nodes.iter_mut().find(|n| n.id == gate_id) {
303 if let Some(ref mut detail) = node.detail {
304 if let Some(obj) = detail.as_object_mut() {
305 obj.insert("resolved".into(), serde_json::Value::Bool(true));
306 }
307 }
308 }
309
310 // Clear pending gate if it matches
311 if self.pending_human_gate.as_deref() == Some(gate_id) {
312 self.pending_human_gate = None;
313 }
314 }
315
316 // =========================================================================
317 // Edge inference

Calls 2

iter_mutMethod · 0.80
insertMethod · 0.45

Tested by 2

test_resolve_human_gateFunction · 0.64