# session_logger.py """ Opens timestamped log/script files at startup and keeps them open for the lifetime of the process. The next run of the GUI creates new files; the previous run's files are simply closed when the process exits. File layout ----------- logs/sessions// comms.log - every comms entry (direction/kind/payload) as JSON-L toolcalls.log - sequential record of every tool invocation apihooks.log - sequential record of every API hook call clicalls.log - sequential record of every CLI subprocess call scripts/ - subdir containing the AI-generated PowerShell scripts outputs/ - subdir containing tool outputs saved via log_tool_output() scripts/generated/ _.ps1 - top-level copy of every PowerShell script the AI generated, in order. The session_dir/scripts/ subdir also gets a copy per session. Where = YYYYMMDD_HHMMSS of when this session was started, and = [_