sessionlog

package
v0.10.16 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 8, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package sessionlog centralizes opening per-request session log files for harness runners and the agent service. It exists to localize the file permission and path-inclusion safety contract in one place rather than scattering nosec annotations across every caller.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnsureDir

func EnsureDir(dir string) error

EnsureDir creates the session log dir (mode 0o700). It exists for callers that need the directory present without opening a file (e.g., to compute a path for a stub write).

func OpenAppend

func OpenAppend(dir, sessionID string) (*os.File, error)

OpenAppend creates dir (mode 0o700) if needed and opens or appends to the per-session log file "agent-<sessionID>.jsonl" beneath it (mode 0o600).

dir is caller-trusted (set by the agent service via SessionLogDir); sessionID is a service-generated identifier (UUID or "<harness>-<unixnano>"). Neither is sourced from network input.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL