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

Function vault_materialize

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

`atomic vault materialize` over ExportVault — the handler inflates the vault entries to markdown in the working copy (the same domain calls), and the CLI prints the local report.

(args: &super::vault::materialize::Materialize)

Source from the content-addressed store, hash-verified

6623/// vault entries to markdown in the working copy (the same domain calls),
6624/// and the CLI prints the local report.
6625pub fn vault_materialize(args: &super::vault::materialize::Materialize) -> CliResult<bool> {
6626 let Some(session) = Service::open()? else {
6627 return Ok(false);
6628 };
6629 let request = pb::ExportVaultRequest {
6630 repository: Some(session.reference.clone()),
6631 meta: request_meta(),
6632 kinds: Vec::new(),
6633 destination: None,
6634 path: args.path.clone(),
6635 view: None,
6636 };
6637 let response = session.export_vault(request)?;
6638 match &response.materialized_path {
6639 Some(path) => println!("Materialized: {}", path),
6640 None => println!("Materialized {} vault entries.", response.exported),
6641 }
6642 Ok(true)
6643}
6644
6645/// `atomic vault summaries` over ListVaultEntries with the previews arm —
6646/// the handler enumerates the ToolResult entries under the goal prefix

Callers 1

runMethod · 0.85

Calls 4

request_metaFunction · 0.70
openFunction · 0.50
cloneMethod · 0.45
export_vaultMethod · 0.45

Tested by

no test coverage detected