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

Function memory_list

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

`atomic memory list` over ListVaultEntries — every form. The handler enumerates the canonical memories (no attestation entries, no index scaffold, most-recent first, the budget truncation) and computes the kind/status/about columns plus the attestation/verifies state with the same domain logic the local body uses; `--identity` names the verifying identity (the `verifies` column's resolver — soft-f

(args: &super::memory::list::MemoryList)

Source from the content-addressed store, hash-verified

1649/// verifying identity (the `verifies` column's resolver — soft-fail to
1650/// "no identity", hard error for a named-but-missing identity).
1651pub fn memory_list(args: &super::memory::list::MemoryList) -> CliResult<bool> {
1652 let Some(session) = Service::open()? else {
1653 return Ok(false);
1654 };
1655 let request = pb::ListVaultEntriesRequest {
1656 repository: Some(session.reference.clone()),
1657 kind: Some(Kind::Memory as i32),
1658 status: None,
1659 summaries_only: false,
1660 cursor: None,
1661 budget: args.limit.map(|limit| pb::PageBudget {
1662 max_items: Some(limit as u32),
1663 max_bytes: None,
1664 }),
1665 view: None,
1666 identity: args.identity.clone(),
1667 path_prefix: None,
1668 entry_type: None,
1669 status_filter: None,
1670 tool_result_previews: false,
1671 sort: Some(args.sort.wire() as i32),
1672 reverse: args.reverse,
1673 };
1674 let response = session.list_vault_entries(request)?;
1675 let rows = response
1676 .entries
1677 .iter()
1678 .map(super::memory::list::wire_row)
1679 .collect::<Vec<_>>();
1680 super::memory::list::MemoryList::render(&rows, args.json);
1681 Ok(true)
1682}
1683
1684/// `atomic memory show` over GetVaultEntry — every form. The wire
1685/// carries the lift inputs (the stored entry) plus the RAW attestation

Callers 1

runMethod · 0.85

Calls 6

openFunction · 0.50
renderFunction · 0.50
cloneMethod · 0.45
wireMethod · 0.45
list_vault_entriesMethod · 0.45
iterMethod · 0.45

Tested by

no test coverage detected