Compare commits
1 Commits
gemini/iss
...
gemini/pas
| Author | SHA1 | Date | |
|---|---|---|---|
| 6572dfdbba |
21
tasks.py
21
tasks.py
@@ -2126,3 +2126,24 @@ def cross_review_prs():
|
||||
continue
|
||||
|
||||
return {"reviews": len(results), "details": results}
|
||||
|
||||
def audit_log(action, actor, details=None, confidence=None):
|
||||
"""Implement Sovereign Audit Trail (SOUL.md).
|
||||
|
||||
Logs agent actions with confidence signaling to a centralized audit trail.
|
||||
"""
|
||||
log_file = TIMMY_HOME / "logs" / "audit.jsonl"
|
||||
log_file.parent.mkdir(parents=True, exist_ok=True)
|
||||
|
||||
entry = {
|
||||
"timestamp": datetime.now(timezone.utc).isoformat(),
|
||||
"action": action,
|
||||
"actor": actor,
|
||||
"details": details,
|
||||
"confidence": confidence, # High, Medium, Low
|
||||
}
|
||||
|
||||
with open(log_file, "a") as f:
|
||||
f.write(json.dumps(entry) + "\n")
|
||||
|
||||
return entry
|
||||
|
||||
Reference in New Issue
Block a user