Commits on May 2, 2026
refactor(objects): MorphObject::kind_str() in core; drop CLI/MCP/forg…
…et duplicates
Phase B of the cleanup sweep. Three nearly-identical mappings from MorphObject variants to lowercase string labels existed across the codebase:
- morph-cli/src/main.rs::morph_object_type_str (12 lines) - morph-mcp/src/main.rs::morph_object_type_str (12 lines) - morph-core/src/forget.rs::ObjectTypeName private trait (~20 lines)
All three are now a single inherent method MorphObject::kind_str(), implemented as a thin alias for self.object_type().as_str(). The new ObjectType::as_str() lives next to the existing MorphObject::object_type() in morph-core/src/store.rs and gives ObjectType a Display impl as a bonus, so callers can write "{}", obj_type instead of obj_type.as_str().
Why this is worth it:
- One source of truth for the on-wire kind string.…