1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
//! # aonyx-api
//!
//! The Aonyx Agent **automation API**: a REST + WebSocket surface over the
//! same core that powers the CLI/TUI. It is a thin transport — every
//! endpoint bottoms out in the existing `aonyx-*` crates, no agent-loop
//! logic is reimplemented here.
//!
//! This crate is feature-driven by the binary: `aonyx-agent` depends on it
//! behind its `api` feature and serves [`build_router`] via
//! `aonyx serve api`. To avoid a dependency cycle, `aonyx-api` never
//! depends on `aonyx-agent`; the agent loop is injected through a trait
//! (added in a later phase), exactly like the channel adapters.
//!
//! ## Surface (grown phase by phase)
//! - **V4.1 (this scaffold)** — [`build_router`] with `/v1/health` (open)
//! and `/v1/info` (bearer-authed), [`ApiState`], [`AuthConfig`],
//! [`ServerInfo`], and the [`ApiError`] response type.
//! - V4.2 — sessions + blocking turns.
//! - V4.3 — WebSocket / SSE streaming.
//! - V4.4 — memory palace, tools, skills, config, OpenAPI.
pub use ;
pub use ;
pub use build_router;
pub use serve;
pub use ;