Resolve the vault-relative path of a stored intent via the manifest. `vault_intent_show` normalizes and confirms existence but does not return a path; `normalize_intent_id` is private, so we match the manifest keys case-insensitively (the manifest keys are the normalized IDs, e.g. `"PIMO-1"`). Returns `None` if the intent has no manifest entry / path.
(repo: &Repository, id: &str)
| 430 | /// case-insensitively (the manifest keys are the normalized IDs, e.g. |
| 431 | /// `"PIMO-1"`). Returns `None` if the intent has no manifest entry / path. |
| 432 | pub fn vault_path_for(repo: &Repository, id: &str) -> BridgeResult<Option<String>> { |
| 433 | let manifest = repo.vault_manifest()?; |
| 434 | Ok(manifest |
| 435 | .intents |
| 436 | .iter() |
| 437 | .find(|(key, _)| key.eq_ignore_ascii_case(id)) |
| 438 | .map(|(_, summary)| summary.vault_path.clone()) |
| 439 | .filter(|p| !p.is_empty())) |
| 440 | } |
| 441 | |
| 442 | #[cfg(test)] |
| 443 | mod tests { |