task-graph-mcp 0.2.2

MCP server for agent task workflows with phases, prompts, gates, and multi-agent coordination
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//! File lock resource handlers.

use crate::db::Database;
use anyhow::Result;
use serde_json::{Value, json};

pub fn get_all_file_locks(db: &Database) -> Result<Value> {
    let locks = db.get_all_file_locks()?;

    Ok(json!({
        "locks": locks.iter().map(|l| json!({
            "file_path": l.file_path,
            "worker_id": l.worker_id.to_string(),
            "locked_at": l.locked_at
        })).collect::<Vec<_>>()
    }))
}