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

Function intent_link

atomic-cli/src/commands/rpc.rs:6345–6366  ·  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

6343/// `atomic intent link` over LinkVaultEntities — the intent→goal link the
6344/// local body's vault_intent_link performs.
6345pub fn intent_link(args: &super::intent::link::IntentLink) -> CliResult<bool> {
6346 let Some(session) = Service::open()? else {
6347 return Ok(false);
6348 };
6349 let request = pb::LinkVaultEntitiesRequest {
6350 repository: Some(session.reference.clone()),
6351 meta: request_meta(),
6352 source: Some(pb::VaultEntityRef {
6353 kind: Kind::Intent as i32,
6354 id: args.id.clone(),
6355 }),
6356 target: Some(pb::VaultEntityRef {
6357 kind: Kind::Goal as i32,
6358 id: args.goal.clone(),
6359 }),
6360 view: None,
6361 expected_snapshot: None,
6362 };
6363 session.link_vault_entities(request)?;
6364 println!("Linked goal '{}' to intent '{}'", args.goal, args.id);
6365 Ok(true)
6366}
6367
6368/// `atomic memory write` over UpdateVaultEntity's MemoryWrite arm — the
6369/// stdin read + frontmatter stay client-side (interactive/file-only);

Callers 1

runMethod · 0.85

Calls 4

openFunction · 0.85
request_metaFunction · 0.70
cloneMethod · 0.45
link_vault_entitiesMethod · 0.45

Tested by

no test coverage detected