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

Function memory_show

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

freeform body.

(args: &super::memory::show::MemoryShow)

Source from the content-addressed store, hash-verified

1742
1743/// freeform body.
1744pub fn memory_show(args: &super::memory::show::MemoryShow) -> CliResult<bool> {
1745 let Some(session) = Service::open()? else {
1746 return Ok(false);
1747 };
1748 let request = pb::GetVaultEntryRequest {
1749 repository: Some(session.reference.clone()),
1750 kind: Kind::Memory as i32,
1751 id: args.id.clone(),
1752 path: None,
1753 include_bundle: true,
1754 view: None,
1755 };
1756 let response = session.get_vault_entry(request)?;
1757 let Some(bundle) = response
1758 .entry_bundle
1759 .as_ref()
1760 .map(parse_entry_bundle)
1761 .transpose()?
1762 else {
1763 return Err(CliError::Internal(anyhow::anyhow!(
1764 "the service returned no entry bundle (include_bundle required)"
1765 )));
1766 };
1767 let inputs = crate::commands::memory::bridge::inputs_from_entry(&bundle.entry)?;
1768 let attestation =
1769 crate::commands::memory::bridge::classify_attestation(memory_sources(&bundle), &inputs);
1770 super::memory::show::project(&args.id, &inputs, &attestation, args.json)?;
1771 Ok(true)
1772}
1773
1774// ---------------------------------------------------------------------------
1775// vault sync + query

Callers 1

runMethod · 0.85

Calls 8

memory_sourcesFunction · 0.85
as_refMethod · 0.80
openFunction · 0.50
inputs_from_entryFunction · 0.50
classify_attestationFunction · 0.50
projectFunction · 0.50
cloneMethod · 0.45
get_vault_entryMethod · 0.45

Tested by

no test coverage detected