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

Function normalize_agent_slug

atomic-canonical/src/prov.rs:117–123  ·  view source on GitHub ↗

Normalize an agent registry name into a slug: lowercase, first hyphen segment (e.g. `"Claude-Code" -> "claude"`). Mirrors the *shape* of `atomic_agent::identity::normalize_agent_name`, implemented locally so this crate does not depend on `atomic-agent`.

(agent_name: &str)

Source from the content-addressed store, hash-verified

115/// `atomic_agent::identity::normalize_agent_name`, implemented locally so this
116/// crate does not depend on `atomic-agent`.
117pub fn normalize_agent_slug(agent_name: &str) -> String {
118 agent_name
119 .split('-')
120 .next()
121 .unwrap_or(agent_name)
122 .to_lowercase()
123}
124
125/// Project a turn's provenance into the named-subgraph JSON-LD.
126///

Callers 1

map_graph_to_inputFunction · 0.85

Calls 1

nextMethod · 0.45

Tested by

no test coverage detected