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

Function intent_validate

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

Source from the content-addressed store, hash-verified

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

Callers 1

runMethod · 0.85

Calls 4

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

Tested by

no test coverage detected