Create a repo+vault and a single intent; return (repo, normalized id, lift inputs for the stored intent).
()
| 326 | /// Create a repo+vault and a single intent; return (repo, normalized id, |
| 327 | /// lift inputs for the stored intent). |
| 328 | fn repo_with_intent() -> (Repository, String, LiftInputs, tempfile::TempDir) { |
| 329 | let dir = tempdir().unwrap(); |
| 330 | let repo = Repository::init(dir.path()).unwrap(); |
| 331 | repo.init_vault().unwrap(); |
| 332 | let result = repo |
| 333 | .vault_intent_create(IntentCreateOptions { |
| 334 | title: "Test intent".to_string(), |
| 335 | priority: Some("medium".to_string()), |
| 336 | assignee: None, |
| 337 | labels: Vec::new(), |
| 338 | session_id: None, |
| 339 | turn_id: None, |
| 340 | }) |
| 341 | .unwrap(); |
| 342 | let id = result.id; |
| 343 | let inputs = read_intent(&repo, &id).unwrap(); |
| 344 | (repo, id, inputs, dir) |
| 345 | } |
| 346 | |
| 347 | /// Mirror `attest`'s tracked-vault write exactly (body = pretty JSON + '\n', |
| 348 | /// flat-string frontmatter anchors). |