Skip to main content

Module api

Module api 

Source
Expand description

Public API layer (Facade) for tmai-core.

This module provides TmaiCore — a high-level entry-point that encapsulates all core services and exposes typed query/action methods. Consumers (TUI, Web, MCP, IDE extensions) should use this API instead of directly operating on SharedState.

§Quick Start

use tmai_core::api::{TmaiCore, TmaiCoreBuilder};

let core = TmaiCoreBuilder::new(settings).build();

// Query agents (lock-free for the caller)
let agents = core.list_agents();
let count = core.attention_count();

// Subscribe to events (Phase 4)
let mut rx = core.subscribe();

Re-exports§

pub use events::CoreEvent;
pub use types::AgentSnapshot;
pub use types::ApiError;
pub use types::TeamSummary;
pub use types::TeamTaskInfo;
pub use actions::has_checkbox_format;

Modules§

actions
Action methods on TmaiCore.
events
Core event system for push-based change notification.
types
Owned snapshot types for the Facade API.

Structs§

TmaiCore
The Facade that wraps all tmai-core services.
TmaiCoreBuilder
Builder for constructing a TmaiCore Facade instance