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

Function repo_with_intent

atomic-cli/src/commands/intent/bridge.rs:328–346  ·  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

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 kind: None,
341 })
342 .unwrap();
343 let id = result.id;
344 let inputs = read_intent(&repo, &id).unwrap();
345 (repo, id, inputs, dir)
346 }
347
348 /// Mirror `attest`'s tracked-vault write exactly (body = pretty JSON + '\n',
349 /// 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