@@ -47,6 +47,8 @@ pub enum StepDomain {
4747 Ndarray ,
4848 /// SMB entity operations (outside BBB — boringly agnostic).
4949 Smb ,
50+ /// Medcare reality-check vertical (clinic data sovereignty).
51+ Medcare ,
5052}
5153
5254impl StepDomain {
@@ -58,21 +60,48 @@ impl StepDomain {
5860 /// "n8n.set" → N8n
5961 /// "lg.cypher" → LanceGraph
6062 /// "nd.hamming" → Ndarray
63+ /// "medcare.check" → Medcare
6164 /// ```
6265 pub fn from_step_type ( step_type : & str ) -> Option < Self > {
6366 let prefix = step_type. split ( '.' ) . next ( ) ?;
6467 match prefix {
65- "crew" => Some ( Self :: Crew ) ,
66- "lb" => Some ( Self :: Ladybug ) ,
67- "n8n" => Some ( Self :: N8n ) ,
68- "lg" => Some ( Self :: LanceGraph ) ,
69- "nd" => Some ( Self :: Ndarray ) ,
70- "smb" => Some ( Self :: Smb ) ,
71- _ => None ,
68+ "crew" => Some ( Self :: Crew ) ,
69+ "lb" => Some ( Self :: Ladybug ) ,
70+ "n8n" => Some ( Self :: N8n ) ,
71+ "lg" => Some ( Self :: LanceGraph ) ,
72+ "nd" => Some ( Self :: Ndarray ) ,
73+ "smb" => Some ( Self :: Smb ) ,
74+ "medcare" => Some ( Self :: Medcare ) ,
75+ _ => None ,
7276 }
7377 }
7478}
7579
80+ #[ cfg( test) ]
81+ mod tests {
82+ use super :: * ;
83+
84+ #[ test]
85+ fn step_domain_medcare_constructs_and_matches ( ) {
86+ let d = StepDomain :: Medcare ;
87+ // Pattern-match smoke test — proves the variant is reachable.
88+ let routed = matches ! ( d, StepDomain :: Medcare ) ;
89+ assert ! ( routed) ;
90+ // Distinct from sibling domains.
91+ assert_ne ! ( StepDomain :: Medcare , StepDomain :: Crew ) ;
92+ assert_ne ! ( StepDomain :: Medcare , StepDomain :: Smb ) ;
93+ }
94+
95+ #[ test]
96+ fn step_domain_medcare_from_step_type ( ) {
97+ assert_eq ! (
98+ StepDomain :: from_step_type( "medcare.reality_check" ) ,
99+ Some ( StepDomain :: Medcare ) ,
100+ ) ;
101+ assert_eq ! ( StepDomain :: from_step_type( "unknown.foo" ) , None ) ;
102+ }
103+ }
104+
76105/// Unified step — the unit of work crossing system boundaries.
77106///
78107/// This is the canonical type. crewai-rust's UnifiedStep and
0 commit comments