|
| 1 | +//! OGAR-driven tenant port bridges. |
| 2 | +//! |
| 3 | +//! This is the OGAR side of the OGIT/OGAR separation (operator, |
| 4 | +//! 2026-06-20). These bridges couple to `ogar_vocab::ports` / |
| 5 | +//! `ogar_vocab::class_ids` (the OGAR codebook + `PortSpec` class schema), |
| 6 | +//! so they live here in `lance-graph-ogar`, NOT in `lance-graph-ontology` |
| 7 | +//! (which is OGIT and must not depend on `ogar-vocab`). The OGIT-side |
| 8 | +//! legacy bridges (`WoaBridge` / `SpearBridge` / `SharePointBridge` / |
| 9 | +//! `OgitBridge`) stay in `lance_graph_ontology::bridges`. |
| 10 | +//! |
| 11 | +//! # Two layers |
| 12 | +//! |
| 13 | +//! - The **generic harness** [`unified::UnifiedBridge<P: PortSpec>`] is the |
| 14 | +//! one-and-only `lance_graph_ontology::NamespaceBridge` impl for |
| 15 | +//! OGAR-driven ports. It inherits everything that varies between ports |
| 16 | +//! (`NAMESPACE` / `BRIDGE_ID` / public-name → class_id aliases) from |
| 17 | +//! `ogar_vocab::ports::PortSpec`. Adding a port is `impl PortSpec for |
| 18 | +//! FooPort {…}` in OGAR — no bridge boilerplate here. |
| 19 | +//! - The **per-port aliases** ([`OpenProjectBridge`], [`RedmineBridge`], |
| 20 | +//! [`MedcareBridge`]) are thin `type` aliases over the harness. |
| 21 | +//! |
| 22 | +//! # OGAR-driven ports (`UnifiedBridge<P>` aliases) |
| 23 | +//! |
| 24 | +//! - [`OpenProjectBridge`]: `UnifiedBridge<ogar_vocab::ports::OpenProjectPort>` |
| 25 | +//! — locks to the `OpenProject` namespace. `WorkPackage` / `TimeEntry` |
| 26 | +//! / `Project` etc. resolve to OGAR canonical class_ids via the |
| 27 | +//! port's alias table. |
| 28 | +//! - [`RedmineBridge`]: `UnifiedBridge<ogar_vocab::ports::RedminePort>` — |
| 29 | +//! locks to the `Redmine` namespace. `Issue` / `TimeEntry` / `Project` |
| 30 | +//! etc. resolve to the SAME OGAR canonical class_ids as the |
| 31 | +//! OpenProject equivalents, so cross-fork convergence is the default |
| 32 | +//! not the exception. |
| 33 | +//! - [`MedcareBridge`]: `UnifiedBridge<ogar_vocab::ports::HealthcarePort>` |
| 34 | +//! — locks to the `Healthcare` namespace. `Patient` / `Diagnosis` / |
| 35 | +//! `LabValue` / `Medication` / `Treatment` / `Visit` / `VitalSign` |
| 36 | +//! resolve to the `0x09XX` Health codebook (Northstar T9). |
| 37 | +
|
| 38 | +pub mod unified; |
| 39 | + |
| 40 | +mod medcare_bridge; |
| 41 | +mod openproject_bridge; |
| 42 | +mod redmine_bridge; |
| 43 | + |
| 44 | +pub use medcare_bridge::{HealthcarePort, MedcareBridge}; |
| 45 | +pub use openproject_bridge::{OpenProjectBridge, OpenProjectPort}; |
| 46 | +pub use redmine_bridge::{RedmineBridge, RedminePort}; |
| 47 | +pub use unified::UnifiedBridge; |
| 48 | + |
| 49 | +// Compatibility shims for the pre-migration constants. `bridges` |
| 50 | +// previously re-exported `OPENPROJECT_CODEBOOK` / `REDMINE_CODEBOOK` |
| 51 | +// directly; both now live in `ogar_vocab::ports::*_ALIASES` (the |
| 52 | +// canonical layer is the single source of truth). The re-exports here |
| 53 | +// are `#[deprecated]` in the per-port modules and forward to the OGAR |
| 54 | +// constants — existing consumers keep compiling (codex P2 on PR #570). |
| 55 | +#[allow(deprecated)] |
| 56 | +pub use openproject_bridge::OPENPROJECT_CODEBOOK; |
| 57 | +#[allow(deprecated)] |
| 58 | +pub use redmine_bridge::REDMINE_CODEBOOK; |
0 commit comments