Private
Public Access
0
0

fix(session_logger): correct stale file layout in module docstring

The top-of-file docstring claimed 'logs/sessions/comms_<ts>.log' with
<ts> as a filename prefix. Actual: per-session subdir
'logs/sessions/<session_id>/' with plain filenames (comms.log,
toolcalls.log, apihooks.log, clicalls.log). The <ts>/session_id
is the PARENT DIR, not a filename prefix.

Per commit 73e1a36d (per-session subdirs), the per-session
directory is the unit of isolation. apihooks.log is a fourth
log file the old docstring omitted entirely.

Also added the new files (apihooks.log, outputs/ subdir) and
clarified the scripts/generated/ dual-write pattern.
This commit is contained in:
2026-06-10 20:59:10 -04:00
parent 2972d235a3
commit 9f89511743
+20 -7
View File
@@ -6,14 +6,27 @@ previous run's files are simply closed when the process exits.
File layout
-----------
logs/sessions/
comms_<ts>.log - every comms entry (direction/kind/payload) as JSON-L
toolcalls_<ts>.log - sequential record of every tool invocation
clicalls_<ts>.log - sequential record of every CLI subprocess call
scripts/generated/
<ts>_<seq:04d>.ps1 - each PowerShell script the AI generated, in order
logs/sessions/<session_id>/
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()
Where <ts> = YYYYMMDD_HHMMSS of when this session was started.
scripts/generated/
<ts>_<seq:04d>.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 <ts> = YYYYMMDD_HHMMSS of when this session was started, and
<session_id> = <ts>[_<Label>] (the optional label is sanitized to
alnum + dash + underscore via open_session(label=...)).
Note: the FILENAMES are plain (comms.log, toolcalls.log, apihooks.log,
clicalls.log) — the <ts>/session_id is the PARENT DIRECTORY, not a filename
prefix. The docstring above previously said comms_<ts>.log which is
incorrect since commit 73e1a36d restructured to per-session subdirs.
"""
import atexit