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

Function provenance_activity_id

libatomic/src/daemon/services_agent.rs:5167–5173  ·  view source on GitHub ↗

Build a unique activity id for a turn's graph — the CLI's `activity_id_for` semantics: ` # ` (or just the session id when none are explained), so turnParent joins.

(graph: &atomic_core::change::ProvenanceGraph)

Source from the content-addressed store, hash-verified

5165/// `activity_id_for` semantics: `<session_id>#<first-explained-change>`
5166/// (or just the session id when none are explained), so turnParent joins.
5167fn provenance_activity_id(graph: &atomic_core::change::ProvenanceGraph) -> String {
5168 use atomic_core::types::Base32;
5169 match graph.changes_explained.first() {
5170 Some(hash) => format!("{}#{}", graph.session_id, hash.to_base32()),
5171 None => graph.session_id.clone(),
5172 }
5173}
5174
5175/// Map a loaded graph into the plain projector input — the CLI's
5176/// `map_graph_to_input` semantics (the turn parent loads the previous

Callers 2

provenance_map_inputFunction · 0.85
export_provenance_implFunction · 0.85

Calls 1

cloneMethod · 0.45

Tested by

no test coverage detected