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

Function repo_with_intent

atomic-repository/src/intent_bridge.rs:390–408  ·  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

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

Calls 6

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