Documentation
¶
Index ¶
Constants ¶
View Source
const (
// FileName is the audit log file name stored under .beads/.
FileName = "interactions.jsonl"
)
Variables ¶
This section is empty.
Functions ¶
func Append ¶
Append appends an event to .beads/interactions.jsonl as a single JSON line. This is intentionally append-only: callers must not mutate existing lines.
func EnsureFile ¶
EnsureFile creates .beads/interactions.jsonl if it does not exist.
Types ¶
type Entry ¶
type Entry struct {
ID string `json:"id"`
Kind string `json:"kind"`
CreatedAt time.Time `json:"created_at"`
// Common metadata
Actor string `json:"actor,omitempty"`
IssueID string `json:"issue_id,omitempty"`
// LLM call
Model string `json:"model,omitempty"`
Prompt string `json:"prompt,omitempty"`
Response string `json:"response,omitempty"`
Error string `json:"error,omitempty"`
// Tool call
ToolName string `json:"tool_name,omitempty"`
ExitCode *int `json:"exit_code,omitempty"`
// Labeling (append-only)
ParentID string `json:"parent_id,omitempty"`
Label string `json:"label,omitempty"` // "good" | "bad" | etc
Reason string `json:"reason,omitempty"` // human / pipeline explanation
Extra map[string]any `json:"extra,omitempty"`
}
Entry is a generic append-only audit event. It is intentionally flexible: use Kind + typed fields for common cases, and Extra for everything else.
Click to show internal directories.
Click to hide internal directories.