Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/pinky_daemon/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -704,6 +704,15 @@ def create_api(
agents = AgentRegistry(db_path=db_path.replace(".db", "_agents.db"))
_refresh_1m_models(agents)
audit = AuditStore(db_path=db_path.replace(".db", "_audit.db"))
# Security-event audit log (#440). Separate DB so a focused export job
# doesn't have to scan the bulky tool-call audit. Append-only by
# convention; no UPDATE/DELETE API. Best-effort writes — login can't
# fail because the audit DB is locked.
from pinky_daemon.security_audit import SecurityAuditStore
security_audit = SecurityAuditStore(
db_path=db_path.replace(".db", "_security_audit.db")
)
app.state.security_audit = security_audit
hooks = HookManager(audit_store=audit)

# In-memory live status for agents (updated by POST /agents/{name}/status).
Expand Down
Loading