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

Function memory_sources

atomic-cli/src/commands/rpc.rs:119–139  ·  view source on GitHub ↗

The memory bridge's sources off one bundle.

(bundle: &EntryBundle)

Source from the content-addressed store, hash-verified

117
118/// The memory bridge's sources off one bundle.
119fn memory_sources(bundle: &EntryBundle) -> crate::commands::memory::bridge::AttestationSources {
120 use crate::commands::memory::bridge::{
121 AttestationSources, SidecarArtifact, TrackedAttestation,
122 };
123 let attestation = bundle.attestation.as_ref();
124 AttestationSources {
125 tracked: attestation
126 .and_then(|sources| sources.tracked.as_ref())
127 .map(|tracked| TrackedAttestation {
128 vault_path: tracked.path.clone(),
129 frontmatter_json: tracked.frontmatter_json.clone(),
130 content: tracked.content.clone(),
131 }),
132 sidecar: attestation
133 .and_then(|sources| sources.sidecar.as_ref())
134 .map(|sidecar| SidecarArtifact {
135 path: sidecar.path.clone(),
136 text: sidecar.text.clone(),
137 }),
138 }
139}
140
141// ---------------------------------------------------------------------------
142// KG wire reconstruction — the domain nodes/edges the JSON renders emit

Callers 1

memory_showFunction · 0.85

Calls 2

as_refMethod · 0.80
cloneMethod · 0.45

Tested by

no test coverage detected