pe-tasks 0.1.0

Task management for Potential Expectations — structured work items, dependency DAG, lifecycle hooks, and agent tools
Documentation
//! # pe-tasks — Task management for Potential Expectations.
//!
//! Structural primitives for agents to create, track, decompose, and
//! depend on work items. The library provides the mechanisms; users
//! build policies (event emission, calendar, kanban, markdown sync) on top.
//! The SurrealDB-backed registry is available with the `surreal` feature.
//!
//! ## Core types
//!
//! - [`Task`] — structured work item with ownership, hierarchy, and metadata
//! - [`TaskStatus`] — lifecycle states (Pending → InProgress → Completed/Failed)
//! - [`TaskType`] — discriminator (System/Agent/Human/Plan)
//! - [`TaskPriority`] — urgency level (Urgent/High/Medium/Low)
//!
//! ## Dependencies
//!
//! - [`TaskDependency`] — directed edge in the dependency DAG
//! - [`DependencyType`] — Blocks (hard), Requires (soft), Related (info)
//! - Cycle detection via BFS upstream traversal
//!
//! ## Lifecycle
//!
//! - [`TaskLifecycle`] trait — hooks for status transitions
//! - [`DefaultLifecycle`] — validates transitions, no side effects
//!
//! ## Registry
//!
//! - [`TaskRegistry`] trait — async CRUD + queries + dependencies
//! - [`InMemoryTaskRegistry`] — HashMap-backed implementation
//! - [`FileTaskRegistry`] — JSON-file-backed local persistence
//! - [`TaskFilter`] — query builder for listing tasks
//!
//! ## Tools
//!
//! - [`tools::task_create`] — create a task
//! - [`tools::task_list`] — list/filter tasks
//! - [`tools::task_complete`] — mark a task done
//! - [`tools::task_decompose`] — split into subtasks with dependencies

pub mod dependency;
pub mod file;
pub mod in_memory;
pub mod lifecycle;
pub mod registry;
#[cfg(feature = "surreal")]
pub mod surreal;
pub mod task;
pub mod tools;

// === Re-exports: core types ===
pub use task::{Task, TaskId, TaskPriority, TaskStatus, TaskType, new_task_id};

// === Re-exports: dependencies ===
pub use dependency::{DependencyType, TaskDependency};

// === Re-exports: lifecycle ===
pub use lifecycle::{DefaultLifecycle, TaskLifecycle};

// === Re-exports: registry ===
pub use file::FileTaskRegistry;
pub use in_memory::InMemoryTaskRegistry;
pub use registry::{TaskFilter, TaskRegistry};
#[cfg(feature = "surreal")]
pub use surreal::SurrealTaskRegistry;