Create a repo+vault and a single intent; return (repo, normalized id, lift inputs for the stored intent).
()
| 345 | /// Create a repo+vault and a single intent; return (repo, normalized id, |
| 346 | /// lift inputs for the stored intent). |
| 347 | fn repo_with_intent() -> (Repository, String, LiftInputs, tempfile::TempDir) { |
| 348 | let dir = tempdir().unwrap(); |
| 349 | let repo = Repository::init(dir.path()).unwrap(); |
| 350 | repo.init_vault().unwrap(); |
| 351 | let result = repo |
| 352 | .vault_intent_create(IntentCreateOptions { |
| 353 | title: "Test intent".to_string(), |
| 354 | priority: Some("medium".to_string()), |
| 355 | assignee: None, |
| 356 | labels: Vec::new(), |
| 357 | session_id: None, |
| 358 | turn_id: None, |
| 359 | }) |
| 360 | .unwrap(); |
| 361 | let id = result.id; |
| 362 | let inputs = read_intent(&repo, &id).unwrap(); |
| 363 | (repo, id, inputs, dir) |
| 364 | } |
| 365 | |
| 366 | /// Mirror `attest`'s tracked-vault write exactly (body = pretty JSON + '\n', |
| 367 | /// flat-string frontmatter anchors). |