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

Function describe_source

atomic-cli/src/commands/diagnostics/collect.rs:1029–1038  ·  view source on GitHub ↗

Describe a receipt's source without leaking credentials or the user's home directory.

(source: &str, agent: &str, home: Option<&Path>)

Source from the content-addressed store, hash-verified

1027/// Describe a receipt's source without leaking credentials or the user's
1028/// home directory.
1029fn describe_source(source: &str, agent: &str, home: Option<&Path>) -> (&'static str, String) {
1030 let registry_url = atomic_agent::integrations::resolve(agent).map(|spec| spec.url);
1031 if registry_url.as_deref() == Some(source) {
1032 ("registry", source.to_string())
1033 } else if source.contains("://") {
1034 ("url", redact::urls(source))
1035 } else {
1036 ("local", display_path(Path::new(source), home))
1037 }
1038}
1039
1040// Skills
1041

Callers 1

collect_fromFunction · 0.85

Calls 4

urlsFunction · 0.85
display_pathFunction · 0.70
resolveFunction · 0.50
containsMethod · 0.45

Tested by

no test coverage detected