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

Function intent_link

atomic-cli/src/commands/rpc.rs:6385–6406  ·  view source on GitHub ↗

`atomic intent link` over LinkVaultEntities — the intent→goal link the local body's vault_intent_link performs.

(args: &super::intent::link::IntentLink)

Source from the content-addressed store, hash-verified

6383/// `atomic intent link` over LinkVaultEntities — the intent→goal link the
6384/// local body's vault_intent_link performs.
6385pub fn intent_link(args: &super::intent::link::IntentLink) -> CliResult<bool> {
6386 let Some(session) = Service::open()? else {
6387 return Ok(false);
6388 };
6389 let request = pb::LinkVaultEntitiesRequest {
6390 repository: Some(session.reference.clone()),
6391 meta: request_meta(),
6392 source: Some(pb::VaultEntityRef {
6393 kind: Kind::Intent as i32,
6394 id: args.id.clone(),
6395 }),
6396 target: Some(pb::VaultEntityRef {
6397 kind: Kind::Goal as i32,
6398 id: args.goal.clone(),
6399 }),
6400 view: None,
6401 expected_snapshot: None,
6402 };
6403 session.link_vault_entities(request)?;
6404 println!("Linked goal '{}' to intent '{}'", args.goal, args.id);
6405 Ok(true)
6406}
6407
6408/// `atomic memory write` over UpdateVaultEntity's MemoryWrite arm — the
6409/// stdin read + frontmatter stay client-side (interactive/file-only);

Callers 1

runMethod · 0.85

Calls 4

request_metaFunction · 0.70
openFunction · 0.50
cloneMethod · 0.45
link_vault_entitiesMethod · 0.45

Tested by

no test coverage detected