file_lock_acquire
Acquire an exclusive lock on a shared file to prevent concurrent edits. If another agent holds the lock, the call returns details about the holder and remaining time.
Instructions
Declare exclusive edit intent on a file to prevent concurrent modifications.
Call this before editing a shared file (types.py, models.py, etc.). If another agent already holds the lock, the call fails with details about who holds it and how long until it expires.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ttl | No | Lock lifetime in seconds (default 300 = 5 minutes). Auto-expires to prevent dead locks if you crash without calling file_lock_release. | |
| file_path | Yes | Absolute or relative path to the file to lock | |
| agent_name | Yes | Your agent name (e.g. "prompt-dev", "event-dev") |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||