Expand description
Database layer for the Task Graph MCP Server.
§Crash Safety
This module uses mutex recovery to prevent cascading failures. If a thread panics while holding the database mutex, subsequent operations will recover the connection rather than panicking on poison errors.
§Known TODO items for improved robustness:
src/db/tasks.rs:612,659-current_owner.unwrap()could panic on inconsistent statesrc/tools/tasks.rs:650-serde_json::to_value().unwrap()could panicsrc/tools/tracking.rs:34,215,338- various unwraps on date/option handlingsrc/tools/attachments.rs:247,250-content.unwrap()assumes content is Somesrc/db/migrations.rs:323,556-expect()on migration path validation
Re-exports§
pub use deps::AddDependencyResult;pub use search::AttachmentMatch;pub use search::SearchResult;
Modules§
- agents
- Worker CRUD operations.
- attachments
- Attachment storage operations.
- dashboard
- Dashboard-specific database queries.
- deps
- Dependency operations and cycle detection with typed dependencies.
- export
- Export functionality for the task-graph database.
- import
- Import functionality for the task-graph database.
- locks
- File lock operations (advisory) and claim tracking.
- schema
- Schema introspection queries for the task-graph database.
- search
- Full-text search operations using FTS5.
- state_
transitions - State and phase transition tracking for automatic time accumulation.
- stats
- Aggregation queries for statistics.
- tasks
- Task CRUD and tree operations.
Structs§
- Database
- Database handle wrapping a SQLite connection.
Functions§
- now_ms
- Get the current timestamp in milliseconds.