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

Function intent_show

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

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

Callers 1

runMethod · 0.85

Calls 8

openFunction · 0.85
intent_sourcesFunction · 0.85
as_refMethod · 0.80
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