log

package
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppendLog

func AppendLog(path, kind, text string) error

AppendLog appends a structured JSON line to the session log using slog.

func FilterLogByKind

func FilterLogByKind(path, kind string, maxBytes int) (string, error)

FilterLogByKind returns log lines tagged with the given kind.

func LoadTodos

func LoadTodos(workDir, sessionID string) ([]todolist.Todo, error)

LoadTodos returns the latest todo snapshot from <workDir>/.agents/elph/metadata/<sessionID>/todos.jsonl.

func OpenLog

func OpenLog(workDir string, sessionID typeid.TypeID) (string, error)

OpenLog opens or creates the session events log for workDir and sessionID.

func OpenRequestsLog

func OpenRequestsLog(workDir string, sessionID typeid.TypeID) (string, error)

OpenRequestsLog opens or creates the provider request trace for a session.

func ReadLogTail

func ReadLogTail(path string, maxBytes int) (string, error)

ReadLogTail returns up to maxBytes from the end of the log file, formatting JSONL records for display when possible.

func RequestsLogPath

func RequestsLogPath(workDir string, sessionID typeid.TypeID) string

RequestsLogPath returns the path for a session's provider/tool request log.

func SaveTodosSnapshot

func SaveTodosSnapshot(workDir, sessionID string, todos []todolist.Todo) error

SaveTodosSnapshot persists the current todo list, replacing any prior snapshot. Empty lists remove the session file so stale state does not linger on disk.

func TodosEqual

func TodosEqual(a, b []todolist.Todo) bool

TodosEqual reports whether two todo lists have the same titles and statuses.

Types

This section is empty.

Jump to

Keyboard shortcuts

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