Buckets:

download
raw
948 Bytes
#!/usr / bin / env -S uv run --script
# /// script
# requires = { python = ">=3.8" }
# ///
"""
Constants for Claude Code Hooks.
"""
import os
from pathlib import Path
# Base directory for all logs
# Default is 'logs' in the current working directory
LOG_BASE_DIR = os.environ.get("CLAUDE_HOOKS_LOG_DIR", "logs")
def get_session_log_dir(session_id: str) -> Path:
"""
Get the log directory for a specific session.
Args:
session_id: The Claude session ID
Returns:
Path object for the session's log directory
"""
return Path(LOG_BASE_DIR) / session_id
def ensure_session_log_dir(session_id: str) -> Path:
"""
Ensure the log directory for a session exists.
Args:
session_id: The Claude session ID
Returns:
Path object for the session's log directory
"""
log_dir = get_session_log_dir(session_id)
log_dir.mkdir(parents=True, exist_ok=True)
return log_dir

Xet Storage Details

Size:
948 Bytes
·
Xet hash:
f9b01e26494dcc4b6fe9050ba5bee73e75aed77e0967d64a491df9cc42e7776b

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.