Add v1.1.0 with progress streaming, timeouts, and git validation.
Surface Cursor run progress to stderr and response payloads, enforce CURSOR_TIMEOUT_SECONDS, validate git repos before delegate, and fix resume session cwd persistence. Includes docs, tests, and packaging. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
22
src/cursor_mcp/audit.py
Normal file
22
src/cursor_mcp/audit.py
Normal file
@@ -0,0 +1,22 @@
|
||||
"""Audit log for Cursor delegations."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import json
|
||||
from datetime import datetime, timezone
|
||||
from pathlib import Path
|
||||
from typing import Any
|
||||
|
||||
from cursor_mcp.config import settings
|
||||
|
||||
|
||||
def audit_log(event: str, payload: dict[str, Any]) -> None:
|
||||
path = Path(settings.audit_log_path).expanduser()
|
||||
path.parent.mkdir(parents=True, exist_ok=True)
|
||||
record = {
|
||||
"ts": datetime.now(timezone.utc).isoformat(),
|
||||
"event": event,
|
||||
**payload,
|
||||
}
|
||||
with path.open("a", encoding="utf-8") as fh:
|
||||
fh.write(json.dumps(record, default=str) + "\n")
|
||||
Reference in New Issue
Block a user