Documentation
¶
Index ¶
- func BuildPrompt(promptTemplate string, cfg config.Config, globalSkillsDir string) string
- func CountEventsSinceMarker(paths config.Paths) (int, time.Time, error)
- func GatherUnprocessedLogs(paths config.Paths, maxLines int) ([]ingest.Event, error)
- func ReadMarker(path string) (time.Time, error)
- func RunCompile(paths config.Paths, cfg config.Config, promptTemplate string) error
- func WriteMarker(path string, t time.Time) error
- type Manifest
- type SessionSummary
- type Trigger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildPrompt ¶
BuildPrompt takes a prompt template string and replaces config variables.
func CountEventsSinceMarker ¶ added in v0.1.7
CountEventsSinceMarker counts events in log files newer than the compile marker without loading them into memory. Returns the count and marker time.
func GatherUnprocessedLogs ¶
GatherUnprocessedLogs reads all JSONL events from log files newer than the last compile marker. Returns events sorted by timestamp, capped at maxLines.
func ReadMarker ¶
ReadMarker reads the timestamp from the compile marker file. Returns zero time if file doesn't exist.
func RunCompile ¶
RunCompile executes the full compilation sequence.
Types ¶
type Manifest ¶
type Manifest struct {
LogsDir string `json:"logs_dir"`
SkillsDir string `json:"skills_dir"`
TotalSessions int `json:"total_sessions"`
TotalEvents int `json:"total_events"`
DateRange [2]string `json:"date_range"`
Sessions []SessionSummary `json:"sessions"`
}
Manifest is the concise overview given to the compiler.
type SessionSummary ¶
type SessionSummary struct {
SessionID string `json:"session_id"`
Date string `json:"date"`
FilePath string `json:"file_path"`
EventCount int `json:"event_count"`
ToolNames []string `json:"tool_names"`
WorkingDirectory string `json:"working_directory"`
}
SessionSummary is a lightweight summary of a single session log file.
type Trigger ¶
type Trigger struct {
// contains filtered or unexported fields
}
Trigger evaluates whether the compilation should fire.
func NewTrigger ¶
NewTrigger creates a Trigger with the given config.
func (*Trigger) MarkFired ¶
func (tr *Trigger) MarkFired()
MarkFired records that a compile was just triggered.
func (*Trigger) SetRunning ¶
SetRunning marks the compilation as currently running (prevents concurrent runs).