| 1 | //! Route foundation: additive, runtime-unwired types for EPIC #2608. |
| 2 | //! |
| 3 | //! This module tree introduces the canonical identity newtypes (#3084) and the |
| 4 | //! `ReadyRouteCandidate` / `RouteResolver` contract (#3384) without touching |
| 5 | //! any runtime routing path. Nothing here is consumed by `config.rs`, the TUI, |
| 6 | //! the client, or the engine yet; it is a self-contained seam that later |
| 7 | //! tracks will wire in. |
| 8 | //! |
| 9 | //! Layering: |
| 10 | //! - [`ids`] — provider/model/wire string newtypes + namespace hints. |
| 11 | //! - [`descriptor`] — route-facing view over the static provider registry. |
| 12 | //! - [`offering`] — provider/model offering seam (wire-id binding). |
| 13 | //! - [`capabilities`] — three-state provider/model capability facts. |
| 14 | //! - [`candidate`] — the runtime-resolved executable route + its parts. |
| 15 | //! - [`errors`] — route resolution errors. |
| 16 | //! - [`resolver`] — the sole producer of [`candidate::ReadyRouteCandidate`]. |
| 17 | //! |
| 18 | //! Naming: the request/response wire shape is spelled [`RequestProtocol`], |
| 19 | //! which is a re-export alias of [`crate::provider::WireFormat`] rather than a |
| 20 | //! fourth protocol synonym. |
| 21 | |
| 22 | #![allow(dead_code)] |
| 23 | |
| 24 | /// The selected endpoint's request/response wire shape. |
| 25 | /// |
| 26 | /// Alias of [`crate::provider::WireFormat`]; intentionally NOT a new enum, to |
| 27 | /// avoid introducing yet another protocol synonym. |
| 28 | pub use crate::provider::WireFormat as RequestProtocol; |
| 29 | |
| 30 | pub mod candidate; |
| 31 | pub mod capabilities; |
| 32 | pub mod descriptor; |
| 33 | pub mod errors; |
| 34 | pub mod ids; |
| 35 | pub mod offering; |
| 36 | pub mod resolver; |
| 37 | |
| 38 | pub use candidate::{ |
| 39 | LimitField, OverrideSource, PricingSku, ReadyRouteCandidate, ResolvedAuthSource, |
| 40 | ResolvedEndpoint, SourcedLimitOverride, ValidationReport, |
| 41 | }; |
| 42 | pub(crate) use capabilities::documented_server_side_web_search; |
| 43 | pub use capabilities::{CapabilityState, RouteCapabilities}; |
| 44 | pub use descriptor::{EndpointDescriptor, ProviderDescriptor}; |
| 45 | pub use errors::RouteError; |
| 46 | pub use ids::{LogicalModelRef, ModelId, NamespaceHint, ProviderId, WireModelId}; |
| 47 | pub use offering::{ProviderModelOffering, RouteLimits, bundled_offerings}; |
| 48 | pub use resolver::{RouteRequest, RouteResolver}; |
| 49 | |
| 50 | #[cfg(test)] |
| 51 | mod conformance_tests; |
| 52 | #[cfg(test)] |
| 53 | mod tests; |
| 54 |