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

Function normalize_agent_slug

atomic-canonical/src/prov.rs:118–124  ·  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

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

Callers 2

map_graph_to_inputFunction · 0.85
provenance_map_inputFunction · 0.85

Calls 1

nextMethod · 0.45

Tested by

no test coverage detected