Expand description
§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 metadataTaskStatus— 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 DAGDependencyType— Blocks (hard), Requires (soft), Related (info)- Cycle detection via BFS upstream traversal
§Lifecycle
TaskLifecycletrait — hooks for status transitionsDefaultLifecycle— validates transitions, no side effects
§Registry
TaskRegistrytrait — async CRUD + queries + dependenciesInMemoryTaskRegistry— HashMap-backed implementationFileTaskRegistry— JSON-file-backed local persistenceTaskFilter— query builder for listing tasks
§Tools
tools::task_create— create a tasktools::task_list— list/filter taskstools::task_complete— mark a task donetools::task_decompose— split into subtasks with dependencies
Re-exports§
pub use task::Task;pub use task::TaskPriority;pub use task::TaskStatus;pub use task::TaskType;pub use task::new_task_id;pub use dependency::DependencyType;pub use dependency::TaskDependency;pub use lifecycle::DefaultLifecycle;pub use lifecycle::TaskLifecycle;pub use file::FileTaskRegistry;pub use in_memory::InMemoryTaskRegistry;pub use registry::TaskFilter;pub use registry::TaskRegistry;
Modules§
- dependency
- Task dependency DAG — blocks/requires/related with cycle detection.
- file
- FileTaskRegistry - JSON-backed task storage.
- in_
memory - InMemoryTaskRegistry — HashMap-backed implementation for testing.
- lifecycle
- Task lifecycle — status transition validation and hooks.
- registry
- TaskRegistry trait — async CRUD + queries + dependencies.
- task
- Core task types — the structural primitives.
- tools
- Task tools — agent-facing API for task management.
Type Aliases§
- TaskId
- Unique identifier for a task. Re-exported from pe-core for consistency.