feat(host): resolve published interface references

This commit is contained in:
2026-09-29 00:03:55 +09:00
parent f9f083d4c6
commit d0683f0b6d
2 changed files with 22 additions and 0 deletions
+12
View File
@@ -208,6 +208,18 @@ impl InterfaceRegistry {
})
}
/// Resolves a transport-provided opaque reference string in this registry.
///
/// The returned value is registry-scoped and suitable for observation or a
/// qualified [`CallRequest`]. Unknown or foreign references return `None`;
/// constructing arbitrary `InterfaceRef` values is intentionally not part of
/// the public API.
#[must_use]
pub fn resolve(&self, reference: &str) -> Option<InterfaceRef> {
let reference = InterfaceRef(reference.to_owned());
self.artifacts.contains_key(&reference).then_some(reference)
}
/// Observes the descriptor and optional validator for an opaque reference.
#[must_use]
pub fn observe(&self, reference: &InterfaceRef) -> Option<InterfaceObservation> {