systemprompt_client/lib.rs
1//! HTTP API client for systemprompt.io deployments.
2//!
3//! [`SystempromptClient`] wraps a pre-configured [`reqwest::Client`] and a
4//! small set of typed methods for the routes documented in
5//! `systemprompt-models::ApiPaths`. [`RemoteCliExecutor`] streams remote CLI
6//! command output over server-sent events into a caller-supplied
7//! [`OutputSink`]. All errors flow through the [`ClientError`] enum.
8//!
9//! # Feature flags
10//!
11//! This crate has no feature flags. `[package.metadata.docs.rs] all-features`
12//! is set so future additions render on docs.rs without further changes.
13//!
14//! # Example
15//!
16//! ```no_run
17//! use systemprompt_client::SystempromptClient;
18//!
19//! # async fn run() -> systemprompt_client::ClientResult<()> {
20//! let client = SystempromptClient::new("https://api.example.com")?;
21//! let healthy = client.check_health().await;
22//! assert!(healthy);
23//! # Ok(()) }
24//! ```
25
26mod client;
27mod error;
28mod remote_cli;
29
30pub use client::SystempromptClient;
31pub use error::{ClientError, ClientResult};
32pub use remote_cli::{OutputSink, RemoteCliExecutor, RemoteCliRequest};