activityreport

package
v0.1.7 Latest Latest
Warning

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

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

Documentation

Overview

Package activityreport generates markdown reports from recent audit activities and writes them to ~/.genie/reports/<agent_name>/<YYYYMMDD>_<report_name>.md, then stores the summary in the vector store so the agent can use it as skill for future runs.

Index

Constants

View Source
const (
	// ActionReport is the cron task action value that triggers the built-in
	// activity report instead of running the agent.
	ActionReport = "genie:report"
)

Variables

This section is empty.

Functions

func ReportPath

func ReportPath(agentName, reportName string, t time.Time) string

ReportPath returns the path for a report file: ~/.genie/reports/<agent_name>/<YYYYMMDD>_<report_name>.md.

func ReportsDir

func ReportsDir(agentName string) string

ReportsDir returns the reports directory for the agent: ~/.genie/reports/<sanitized_agent_name>/.

Types

type Generator

type Generator struct {
	// contains filtered or unexported fields
}

Generator produces activity reports from audit log events and persists them to disk and vector memory.

func NewGenerator

func NewGenerator(agentName string, vectorStore vector.IStore, lookback time.Duration, auditor audit.Auditor) *Generator

NewGenerator creates a Generator for the given agent, vector store, and auditor. If vectorStore is nil, report content is still written to disk but not stored in memory. lookback defines how far back to read activities; zero means defaultLookback. auditor is used to read recent activities via Recent; if nil, Generate will return an error when building.

func (*Generator) Generate

func (g *Generator) Generate(ctx context.Context, reportName string, at time.Time) error

Generate reads recent activities, builds a deterministic summary, writes the report to ReportPath(agentName, reportName, at), and upserts the summary into the vector store so it is searchable via memory_search. Without this method, cron-triggered activity reports would not be produced.

Jump to

Keyboard shortcuts

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