interplane.Get Omega
Read in your language

aien-sovereign-core-mv

AienOS host runtime: inference scheduling, paged KV state, the aien CLI and Spark verification tooling. Its inference engine is in alpha testing (DGX Spark GB10); Omega is the implementation destination.

Brought by drakestapleton

branch main Branches Tags History

aien-sovereign-core-mv / crates / aien-localhttp / src / lib.rs

51 lines · 2244 bytes Raw Blame History
1// SPDX-License-Identifier: Apache-2.0
2// Copyright 2026 Drake Stapleton (AIEN / aien-dev)
3//
4// Licensed under the Apache License, Version 2.0 (the "License");
5// you may not use this file except in compliance with the License.
6// You may obtain a copy of the License at
7//
8// http://www.apache.org/licenses/LICENSE-2.0
9//
10// Unless required by applicable law or agreed to in writing, software
11// distributed under the License is distributed on an "AS IS" BASIS,
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13// See the License for the specific language governing permissions and
14// limitations under the License.
15
16//! aien-localhttp: a small native HTTP/1.1 client for plain `http://` calls to
17//! local services (Cortex, the model seat, AEGIS, health probes).
18//!
19//! What it does:
20//! - GET and POST over a tokio `TcpStream`, one connection per request
21//! (`Connection: close`, no pooling, no proxies, no redirects).
22//! - Request headers (Bearer, Content-Type), JSON bodies, `Content-Length`.
23//! - Response bodies framed by `Content-Length`, `Transfer-Encoding: chunked`
24//! or connection close, with a body size cap and a response head size cap.
25//! - A line stream over the body for server-sent events ([`Response::next_line`]).
26//! - Connect timeout and a total timeout that covers the whole exchange,
27//! including reading the body.
28//! - A blocking entry point for sync callers ([`RequestBuilder::send_blocking`]).
29//!
30//! What it refuses:
31//! - `https://` URLs fail with [`Error::HttpsRefused`]. The client never
32//! downgrades https to http and carries no crypto. External https stays on
33//! the vetted TLS stack used elsewhere in the workspace.
34//! - Any scheme other than `http`, credentials in the URL, header values with
35//! CR, LF or NUL, and caller-supplied framing headers (`Host`,
36//! `Content-Length`, `Transfer-Encoding`, `Connection`).
37
38mod client;
39mod error;
40mod response;
41mod status;
42mod url;
43
44pub use client::{Client, ClientBuilder, Method, RequestBuilder, DEFAULT_MAX_BODY_BYTES};
45pub use error::Error;
46pub use response::{BlockingResponse, Response, MAX_HEAD_BYTES};
47pub use status::StatusCode;
48pub use url::Url;
49
50#[cfg(feature = "test-server")]
51pub mod test_server;