//! Project life-cycle use cases (ARCHITECTURE §6, L2).
//!
//! Each use case is a struct carrying its ports as `Arc<dyn Port>` and exposing
//! a single `execute(input) -> Result<output, AppError>` method
//! (**Single Responsibility**). They talk **only** to the domain ports, never to
//! concrete adapters; the composition root injects the implementations.
//!
//! - [`CreateProject`] — validate the root, create `.ideai/project.json`,
//!   register the project, publish [`domain::DomainEvent::ProjectCreated`].
//! - [`OpenProject`] — load a project and its `.ideai/project.json` meta (plus,
//!   tolerantly, the agent manifest if present).
//! - [`CloseProject`] / [`CloseTab`] — persist state and release resources
//!   (no PTYs yet in L2).
//! - [`ListProjects`] — list known projects from the registry.

mod close;
mod context;
mod create;
pub(crate) mod meta;
mod open;

pub use close::{CloseProject, CloseProjectInput, CloseProjectOutput, CloseTab, CloseTabInput};
pub use context::{
    project_context_path, ReadProjectContext, ReadProjectContextInput, ReadProjectContextOutput,
    UpdateProjectContext, UpdateProjectContextInput, PROJECT_CONTEXT_FILE,
};
pub use create::{CreateProject, CreateProjectInput, CreateProjectOutput};
pub use meta::ProjectMeta;
pub use open::{
    ListProjects, ListProjectsOutput, OpenProject, OpenProjectInput, OpenProjectOutput,
};
