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

Function repo_with_intent

atomic-cli/src/commands/intent/bridge.rs:347–364  ·  view source on GitHub ↗

Create a repo+vault and a single intent; return (repo, normalized id, lift inputs for the stored intent).

()

Source from the content-addressed store, hash-verified

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).

Calls 5

read_intentFunction · 0.85
vault_intent_createMethod · 0.80
unwrapMethod · 0.45
pathMethod · 0.45
init_vaultMethod · 0.45