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

Function intent_validate

atomic-cli/src/commands/rpc.rs:1136–1151  ·  view source on GitHub ↗
(args: &super::intent::validate::IntentValidate)

Source from the content-addressed store, hash-verified

1134}
1135
1136pub fn intent_validate(args: &super::intent::validate::IntentValidate) -> CliResult<bool> {
1137 // Path-arg form reads a file, no redb — stays local.
1138 if args.id_or_path.ends_with(".md") || args.id_or_path.contains('/') {
1139 return Ok(false);
1140 }
1141 let Some(session) = Service::open()? else {
1142 return Ok(false);
1143 };
1144 // Evidence replay needs the manifest and checker on the service host; the
1145 // handler owns the pins, the ordinary gate, and the post-checker freshness
1146 // read. The local body remains the fallback when no service session exists.
1147 if args.evidence_context || args.replay_evidence.is_some() {
1148 return replay_evidence(&session, args);
1149 }
1150 validate_entity(&session, Kind::Intent, &args.id_or_path, args.json)
1151}
1152
1153fn replay_evidence(
1154 session: &Service,

Callers 1

runMethod · 0.85

Calls 4

replay_evidenceFunction · 0.85
validate_entityFunction · 0.85
openFunction · 0.50
containsMethod · 0.45

Tested by

no test coverage detected