aerocontext_core/lib.rs
1//! Domain model and pluggable provider contract for aeronautical context.
2//!
3//! This crate defines the provider-neutral types ([`model`]) and the
4//! [`ContextProvider`] trait that every context-provider adapter implements
5//! (aviationweather.gov, Leidos Flight Service, future European sources).
6//! The assembled context serves a human pilot as a briefing and an AI agent
7//! as grounded, attributable context.
8//!
9//! # Capabilities
10//!
11//! Every provider implements the [`ContextProvider`] identity trait, then
12//! one capability trait per kind of context it serves:
13//!
14//! - [`WeatherBriefingProvider`] — area weather briefings (METAR/TAF/…),
15//! the only capability implemented today.
16//! - [`OwnshipStatusProvider`] and [`ControlCommandProvider`] — sibling
17//! capabilities, stubbed pending real sources.
18//!
19//! Splitting by capability (not by provider) lets a new source — a future
20//! European service, or a datalink source like FIS-B — implement only the
21//! capabilities it offers, and lets each consumer depend only on the context
22//! it needs. The weather data it returns ([`Briefing`], [`Product`],
23//! [`model::ProductKind`]) is `#[non_exhaustive]`, so it grows without
24//! breaking existing adapters.
25
26pub mod command;
27pub mod compare;
28pub mod geo;
29pub mod model;
30pub mod navdata;
31pub mod ownship;
32pub mod provider;
33pub mod weather;
34
35pub use command::{CommandAck, ControlCommand, ControlCommandProvider};
36pub use compare::{
37 Agreement, ComparisonReport, ProductComparison, ProductKey, SourcedValue, compare,
38};
39pub use model::{Area, AreaBriefingRequest, Briefing, GeoPoint, Product, ProductKind, ValidPeriod};
40pub use navdata::{
41 AIRAC_CYCLE_DAYS, Airway, AirwayLocation, AirwayPoint, FAA_NASR_CYCLE_DAYS,
42 FAA_NASR_SUBSCRIPTION_URL, NavDataAuthority, NavDataCycle, NavDataError, NavDataSnapshot,
43 NavPoint, NavPointKind,
44};
45pub use ownship::{OwnshipStatus, OwnshipStatusProvider};
46pub use provider::{ContextProvider, ProviderError};
47pub use weather::WeatherBriefingProvider;