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

Function intent_sources

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

The intent bridge's sources off one bundle.

(bundle: &EntryBundle)

Source from the content-addressed store, hash-verified

94
95/// The intent bridge's sources off one bundle.
96fn intent_sources(bundle: &EntryBundle) -> crate::commands::intent::bridge::AttestationSources {
97 use crate::commands::intent::bridge::{
98 AttestationSources, SidecarArtifact, TrackedAttestation,
99 };
100 let attestation = bundle.attestation.as_ref();
101 AttestationSources {
102 tracked: attestation
103 .and_then(|sources| sources.tracked.as_ref())
104 .map(|tracked| TrackedAttestation {
105 vault_path: tracked.path.clone(),
106 frontmatter_json: tracked.frontmatter_json.clone(),
107 content: tracked.content.clone(),
108 }),
109 sidecar: attestation
110 .and_then(|sources| sources.sidecar.as_ref())
111 .map(|sidecar| SidecarArtifact {
112 path: sidecar.path.clone(),
113 text: sidecar.text.clone(),
114 }),
115 }
116}
117
118/// The memory bridge's sources off one bundle.
119fn memory_sources(bundle: &EntryBundle) -> crate::commands::memory::bridge::AttestationSources {

Callers 1

intent_showFunction · 0.85

Calls 2

as_refMethod · 0.80
cloneMethod · 0.45

Tested by

no test coverage detected