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

Function provenance_activity_id

libatomic/src/daemon/services_agent.rs:5219–5225  ·  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

5217/// `activity_id_for` semantics: `<session_id>#<first-explained-change>`
5218/// (or just the session id when none are explained), so turnParent joins.
5219fn provenance_activity_id(graph: &atomic_core::change::ProvenanceGraph) -> String {
5220 use atomic_core::types::Base32;
5221 match graph.changes_explained.first() {
5222 Some(hash) => format!("{}#{}", graph.session_id, hash.to_base32()),
5223 None => graph.session_id.clone(),
5224 }
5225}
5226
5227/// Map a loaded graph into the plain projector input — the CLI's
5228/// `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