event

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2026 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Overview

Package event defines event log constants, display limits, and context-size event names.

Index

Constants

View Source
const (
	// EventsMessageMaxLen is the maximum character length for event messages
	// in human-readable output before truncation.
	EventsMessageMaxLen = 60
	// EventsHookFallback is the placeholder displayed when no hook name
	// can be determined from an event payload.
	EventsHookFallback = "-"
	// EventsTruncationSuffix is appended to truncated event messages.
	EventsTruncationSuffix = "..."
)

Events display configuration.

View Source
const (
	// FileEventLog is the current event log file.
	FileEventLog = "events.jsonl"
	// FileEventLogPrev is the rotated (previous) event log file.
	FileEventLogPrev = "events.1.jsonl"
	// LogMaxBytes is the size threshold for log rotation (1MB).
	LogMaxBytes = 1 << 20
	// HookLogMaxBytes is the size threshold for hook log rotation (1MB).
	HookLogMaxBytes = 1 << 20
	// RotationSuffix is the suffix appended to log files during rotation.
	RotationSuffix = ".1"
	// DefaultEventsLast is the default number of events shown by ctx system events.
	DefaultEventsLast = 50
)

Event log constants for .context/state/ directory.

View Source
const (
	// EventSuppressed is the event name for suppressed prompts.
	EventSuppressed = "suppressed"
	// EventSilent is the event name for silent (no-action) prompts.
	EventSilent = "silent"
	// EventCheckpoint is the event name for context checkpoint emissions.
	EventCheckpoint = "checkpoint"
	// EventWindowWarning is the event name for context window warning emissions.
	EventWindowWarning = "window-warning"
)

Context-size event names.

Variables

This section is empty.

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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