Expand description
Task queue persistence, validation, and pruning.
Responsibilities:
- Load, save, and validate queue files in JSON format.
- Provide operations for moving completed tasks and pruning history.
- Own queue-level helpers such as ID generation and validation.
Not handled here:
- Directory lock acquisition (see
crate::lock). - CLI parsing or user interaction.
- Runner integration or external command execution.
Invariants/assumptions:
- Queue files conform to the schema in
crate::contracts. - Callers hold locks when mutating queue state on disk.
Re-exports§
pub use prune::PruneOptions;pub use prune::PruneReport;pub use prune::prune_done_tasks;pub use search::SearchOptions;pub use search::filter_tasks;pub use search::fuzzy_search_tasks;pub use search::search_tasks;pub use search::search_tasks_with_options;pub use size_check::SizeCheckResult;pub use size_check::check_queue_size;pub use size_check::count_threshold_or_default;pub use size_check::print_size_warning_if_needed;pub use size_check::size_threshold_or_default;pub use validation::ValidationWarning;pub use validation::log_warnings;pub use validation::validate_queue;pub use validation::validate_queue_set;pub use graph::*;pub use operations::*;pub use repair::*;
Modules§
- graph
- Dependency graph analysis for task queues.
- hierarchy
- Task hierarchy indexing and navigation based on
parent_id. - operations
- Task queue task-level operations.
- prune
- Queue pruning submodule.
- repair
- Queue repair and dependency traversal.
- search
- Task queue search and filtering.
- size_
check - Queue file size checking and warning generation.
- validation
- Queue validation submodule.
Functions§
- acquire_
queue_ lock - attempt_
json_ repair - Attempt to repair common JSON errors induced by agents. Returns Some(repaired_json) if repairs were made, None if no repairs possible.
- backup_
queue - Create a backup of the queue file before modification. Returns the path to the backup file.
- format_
id - load_
and_ validate_ queues - Load the active queue and optionally the done queue, validating both.
- load_
queue - Load queue from path with standard JSONC parsing.
- load_
queue_ or_ default - Load queue from path, returning default if file doesn’t exist.
- load_
queue_ with_ repair - Load queue with automatic repair for common JSON errors. Attempts to fix trailing commas and other common agent-induced mistakes.
- load_
queue_ with_ repair_ and_ validate - Load queue with JSON repair and semantic validation.
- next_
id_ across - normalize_
prefix - repair_
and_ validate_ queues - Explicitly repair queue/done timestamp maintenance and persist the result before validation.
- save_
queue