Skip to content

Commit 98c7ca9

Browse files
authored
Merge pull request #604 from AdaWorldAPI/claude/medcare-bridge-lance-graph-wmx76z
contract: mirror ConceptDomain::Automation (0x0C) from OGAR codebook mint
2 parents b1ad1b5 + 6d113c3 commit 98c7ca9

1 file changed

Lines changed: 29 additions & 1 deletion

File tree

crates/lance-graph-contract/src/ogar_codebook.rs

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,14 @@ pub enum ConceptDomain {
6060
Anatomy,
6161
/// `0x0BXX` — Auth (identity / authz: AuthStore, Zitadel, Zanzibar, Ory Keto).
6262
Auth,
63-
/// Any high-byte slot not yet assigned a domain (`0x03XX`–`0x06XX`, `0x0CXX`+).
63+
/// `0x0CXX` — Automation (the HIRO IT-automation stack: the MARS structural
64+
/// CMDB — `mars_application` / `mars_resource` / `mars_software` /
65+
/// `mars_machine` — and the Automation DO-arm actuators — `knowledge_item` /
66+
/// `mars_node_template` / `action_handler` / `action_applicability` /
67+
/// `automation_trigger`). Infrastructure config, not PHI. Mirrors OGAR
68+
/// `ogar_vocab::ConceptDomain::Automation`.
69+
Automation,
70+
/// Any high-byte slot not yet assigned a domain (`0x03XX`–`0x06XX`, `0x0DXX`+).
6471
Unassigned,
6572
}
6673

@@ -79,6 +86,7 @@ pub fn canonical_concept_domain(id: u16) -> ConceptDomain {
7986
0x09 => ConceptDomain::Health,
8087
0x0A => ConceptDomain::Anatomy,
8188
0x0B => ConceptDomain::Auth,
89+
0x0C => ConceptDomain::Automation,
8290
_ => ConceptDomain::Unassigned,
8391
}
8492
}
@@ -321,6 +329,18 @@ pub const CODEBOOK: &[(&str, u16)] = &[
321329
("auth_zitadel", 0x0B02),
322330
("auth_zanzibar", 0x0B03),
323331
("auth_ory_keto", 0x0B04),
332+
// ── 0x0CXX — Automation domain (HIRO IT-automation: MARS CMDB + DO-arm
333+
// actuators; OGAR's 0x0C Automation domain). One domain spanning the MARS
334+
// structural CMDB and the Automation behavioral vocabulary. ──
335+
("mars_application", 0x0C01),
336+
("mars_resource", 0x0C02),
337+
("mars_software", 0x0C03),
338+
("mars_machine", 0x0C04),
339+
("knowledge_item", 0x0C05),
340+
("mars_node_template", 0x0C06),
341+
("action_handler", 0x0C07),
342+
("action_applicability", 0x0C08),
343+
("automation_trigger", 0x0C09),
324344
];
325345

326346
/// Resolve a **canonical-concept** string to its stable `u16` codebook id via
@@ -394,7 +414,10 @@ mod tests {
394414
assert_eq!(canonical_concept_domain(0x0901), ConceptDomain::Health);
395415
assert_eq!(canonical_concept_domain(0x0A01), ConceptDomain::Anatomy);
396416
assert_eq!(canonical_concept_domain(0x0B01), ConceptDomain::Auth);
417+
assert_eq!(canonical_concept_domain(0x0C01), ConceptDomain::Automation);
418+
assert_eq!(canonical_concept_domain(0x0C09), ConceptDomain::Automation);
397419
assert_eq!(canonical_concept_domain(0x0500), ConceptDomain::Unassigned);
420+
assert_eq!(canonical_concept_domain(0x0D00), ConceptDomain::Unassigned);
398421
}
399422

400423
#[test]
@@ -454,6 +477,11 @@ mod tests {
454477
assert_eq!(canonical_concept_id("vital_sign"), Some(0x0907));
455478
assert_eq!(canonical_concept_id("auth_store"), Some(0x0B01));
456479
assert_eq!(canonical_concept_id("auth_ory_keto"), Some(0x0B04));
480+
// 0x0CXX Automation (the MARS/Automation codebook pass minted these in OGAR).
481+
assert_eq!(canonical_concept_id("mars_application"), Some(0x0C01));
482+
assert_eq!(canonical_concept_id("knowledge_item"), Some(0x0C05));
483+
assert_eq!(canonical_concept_id("mars_node_template"), Some(0x0C06));
484+
assert_eq!(canonical_concept_id("automation_trigger"), Some(0x0C09));
457485
assert_eq!(canonical_concept_id("not_a_concept"), None);
458486
}
459487

0 commit comments

Comments
 (0)