origin_ai/lib.rs
1//! Inference the application performs itself.
2//!
3//! This is the **embedded** half of Origin's AI story, and it has nothing to do with
4//! MCP. The two are deliberately separate (ADR-0027):
5//!
6//! ```text
7//! ┌── MCP server external AI controls the app
8//! UI ── Application Core ──┤
9//! └── AIService the app performs inference itself
10//! ```
11//!
12//! Using MCP as a general inference API would be the wrong abstraction: the protocol
13//! connects a client to a server's tools, not an application to somebody's model
14//! subscription.
15//!
16//! Domain code depends on [`AiService`], never on a provider. A product without the
17//! capability simply has no service, and every AI feature it has is off — which is the
18//! point: nothing an Origin application does may *depend* on a model being reachable.
19
20mod request;
21mod service;
22
23#[cfg(feature = "testing")]
24pub mod testing;
25
26pub use request::{Completion, Prompt, Usage};
27pub use service::{AiService, NoopAiService};