Create a repo+vault and a single intent; return (repo, normalized id, lift inputs for the stored intent).
()
| 388 | /// Create a repo+vault and a single intent; return (repo, normalized id, |
| 389 | /// lift inputs for the stored intent). |
| 390 | fn repo_with_intent() -> (Repository, String, LiftInputs, tempfile::TempDir) { |
| 391 | let dir = tempdir().unwrap(); |
| 392 | let repo = Repository::init(dir.path()).unwrap(); |
| 393 | repo.init_vault().unwrap(); |
| 394 | let result = repo |
| 395 | .vault_intent_create(IntentCreateOptions { |
| 396 | title: "Test intent".to_string(), |
| 397 | priority: Some("medium".to_string()), |
| 398 | assignee: None, |
| 399 | labels: Vec::new(), |
| 400 | session_id: None, |
| 401 | turn_id: None, |
| 402 | kind: None, |
| 403 | }) |
| 404 | .unwrap(); |
| 405 | let id = result.id; |
| 406 | let inputs = read_intent(&repo, &id).unwrap(); |
| 407 | (repo, id, inputs, dir) |
| 408 | } |
| 409 | |
| 410 | /// Mirror `attest`'s tracked-vault write exactly (body = pretty JSON + '\n', |
| 411 | /// flat-string frontmatter anchors). |