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

Function memory_list

atomic-cli/src/commands/rpc.rs:1650–1681  ·  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

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

Callers 1

runMethod · 0.85

Calls 6

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

Tested by

no test coverage detected