Add persisted LLM audit logging

This commit is contained in:
2026-03-23 11:41:43 +08:00
parent 5e85129869
commit bad1e16ab4
4 changed files with 282 additions and 2 deletions

View File

@ -4,6 +4,7 @@ from nanobot.utils.helpers import (
ensure_dir,
get_cron_store_path,
get_data_path,
get_logs_path,
get_workspace_path,
get_workspace_state_path,
)
@ -13,5 +14,6 @@ __all__ = [
"get_workspace_path",
"get_workspace_state_path",
"get_data_path",
"get_logs_path",
"get_cron_store_path",
]

View File

@ -42,6 +42,11 @@ def get_data_path() -> Path:
return ensure_dir(Path.home() / ".nanobot")
def get_logs_path() -> Path:
"""获取后端日志目录(~/.nanobot/logs"""
return ensure_dir(get_data_path() / "logs")
def get_legacy_cron_store_path() -> Path:
"""获取旧版全局 cron store 路径(~/.nanobot/cron/jobs.json"""
return get_data_path() / "cron" / "jobs.json"