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

Method resolve_human_gate

atomic-agent/src/provenance/accumulator/append.rs:387–401  ·  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

385 /// The next node appended after this will get a `ResumedAfter` edge
386 /// from the goal (if any), since the gate is cleared by `append_goal`.
387 pub fn resolve_human_gate(&mut self, gate_id: &str) {
388 // Update the node's detail to mark it resolved
389 if let Some(node) = self.nodes.iter_mut().find(|n| n.id == gate_id) {
390 if let Some(ref mut detail) = node.detail {
391 if let Some(obj) = detail.as_object_mut() {
392 obj.insert("resolved".into(), serde_json::Value::Bool(true));
393 }
394 }
395 }
396
397 // Clear pending gate if it matches
398 if self.pending_human_gate.as_deref() == Some(gate_id) {
399 self.pending_human_gate = None;
400 }
401 }
402
403 // =========================================================================
404 // Edge inference

Calls 2

iter_mutMethod · 0.80
insertMethod · 0.45

Tested by 2

test_resolve_human_gateFunction · 0.64