Skip to main content

kind_for

Function kind_for 

Source
pub fn kind_for(program: &str) -> Option<ProgramKind>
Expand description

Map a primary program name to its ProgramKind, or None for unknown commands.

Resolution order:

  1. Exact match in [PROGRAM_KIND_TABLE].
  2. Substring fallback for “yah” (case-insensitive) — yah-yubaba, yah-camp, yah-image-mcp etc. all classify as ProgramKind::Yah. Wins over the mcp fallback below: a yah binary that happens to speak MCP is still a yah binary.
  3. Substring fallback for “mcp” (case-insensitive) — mcp-server-foo, claude-mcp, etc. classify as ProgramKind::Mcp.

Consumed by the summariser and exposed for downstream tools (permission rules, indexers) that want the same classification.