Skip to main content

tmai_core/api/
mod.rs

1//! Public API layer (Facade) for tmai-core.
2//!
3//! This module provides [`TmaiCore`] — a high-level entry-point that
4//! encapsulates all core services and exposes typed query/action methods.
5//! Consumers (TUI, Web, MCP, IDE extensions) should use this API instead
6//! of directly operating on `SharedState`.
7//!
8//! # Quick Start
9//!
10//! ```ignore
11//! use tmai_core::api::{TmaiCore, TmaiCoreBuilder};
12//!
13//! let core = TmaiCoreBuilder::new(settings).build();
14//!
15//! // Query agents (lock-free for the caller)
16//! let agents = core.list_agents();
17//! let count = core.attention_count();
18//!
19//! // Subscribe to events (Phase 4)
20//! let mut rx = core.subscribe();
21//! ```
22
23pub mod actions;
24mod builder;
25mod core;
26pub mod events;
27mod queries;
28pub mod types;
29
30pub use builder::TmaiCoreBuilder;
31pub use core::TmaiCore;
32pub use events::CoreEvent;
33pub use types::{AgentSnapshot, ApiError, TeamSummary, TeamTaskInfo};
34
35// Re-export for web/api.rs usage
36pub use actions::has_checkbox_format;