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

Function vault_materialize

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

6583/// vault entries to markdown in the working copy (the same domain calls),
6584/// and the CLI prints the local report.
6585pub fn vault_materialize(args: &super::vault::materialize::Materialize) -> CliResult<bool> {
6586 let Some(session) = Service::open()? else {
6587 return Ok(false);
6588 };
6589 let request = pb::ExportVaultRequest {
6590 repository: Some(session.reference.clone()),
6591 meta: request_meta(),
6592 kinds: Vec::new(),
6593 destination: None,
6594 path: args.path.clone(),
6595 view: None,
6596 };
6597 let response = session.export_vault(request)?;
6598 match &response.materialized_path {
6599 Some(path) => println!("Materialized: {}", path),
6600 None => println!("Materialized {} vault entries.", response.exported),
6601 }
6602 Ok(true)
6603}
6604
6605/// `atomic vault summaries` over ListVaultEntries with the previews arm —
6606/// the handler enumerates the ToolResult entries under the goal prefix

Callers 1

runMethod · 0.85

Calls 4

openFunction · 0.85
request_metaFunction · 0.70
cloneMethod · 0.45
export_vaultMethod · 0.45

Tested by

no test coverage detected