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

Function print_value

atomic-cli/src/commands/provenance/command.rs:328–343  ·  view source on GitHub ↗

Print the PROV JSON-LD artifact(s) to stdout. When `signed`, add the dev-signature caveat (the signing path was used).

(values: &[serde_json::Value], signed: bool)

Source from the content-addressed store, hash-verified

326/// Print the PROV JSON-LD artifact(s) to stdout. When `signed`, add the
327/// dev-signature caveat (the signing path was used).
328fn print_value(values: &[serde_json::Value], signed: bool) {
329 let out = if values.len() == 1 {
330 serde_json::to_string_pretty(&values[0])
331 } else {
332 serde_json::to_string_pretty(&values)
333 }
334 .expect("PROV value serialization is infallible");
335 println!("{out}");
336 if signed {
337 eprintln!(
338 "note: signing keys are stored unencrypted on disk; treat this \
339 signed projection as a non-production dev signature until key-at-rest \
340 encryption lands."
341 );
342 }
343}
344
345/// Print the human-readable flywheel chain — the routed render: change ->
346/// activity -> generated -> agent -> person -> turnParent -> ... (the

Callers 2

runMethod · 0.85
print_dsseFunction · 0.85

Calls 1

lenMethod · 0.45

Tested by

no test coverage detected