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

Function intent_show

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

`atomic intent show` over GetVaultEntry — every form. The wire carries the lift inputs (the stored entry) plus the RAW attestation sources (the tracked entry and the legacy sidecar), so the CLI runs its EXISTING bridge::lift / bridge::load_attestation code unchanged over wire-carried inputs and projects with the same render the local body uses — byte-parity for the JSON-LD projection.

(args: &super::intent::show::IntentShow)

Source from the content-addressed store, hash-verified

1421/// over wire-carried inputs and projects with the same render the local
1422/// body uses — byte-parity for the JSON-LD projection.
1423pub fn intent_show(args: &super::intent::show::IntentShow) -> CliResult<bool> {
1424 let Some(session) = Service::open()? else {
1425 return Ok(false);
1426 };
1427 let request = pb::GetVaultEntryRequest {
1428 repository: Some(session.reference.clone()),
1429 kind: Kind::Intent as i32,
1430 id: args.id.clone(),
1431 path: None,
1432 include_bundle: true,
1433 view: None,
1434 };
1435 let response = session.get_vault_entry(request)?;
1436 let Some(bundle) = response
1437 .entry_bundle
1438 .as_ref()
1439 .map(parse_entry_bundle)
1440 .transpose()?
1441 else {
1442 return Err(CliError::Internal(anyhow::anyhow!(
1443 "the service returned no entry bundle (include_bundle required)"
1444 )));
1445 };
1446 let inputs = crate::commands::intent::bridge::inputs_from_entry(&bundle.entry)?;
1447 let attestation =
1448 crate::commands::intent::bridge::classify_attestation(intent_sources(&bundle), &inputs);
1449 super::intent::show::project(&args.id, &inputs, &attestation, args.json)?;
1450 Ok(true)
1451}
1452
1453fn validate_entity(session: &Service, kind: Kind, id: &str, json: bool) -> CliResult<bool> {
1454 let request = pb::ValidateVaultEntityRequest {

Callers 1

runMethod · 0.85

Calls 8

intent_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