generator

package
v0.2.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Generator

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

Generator generates honeypot scenarios using an LLM agent.

func New

func New(llmClient gollem.LLMClient, outputDir string, params *prompts.Params, opts ...Option) *Generator

New creates a new Generator.

func (*Generator) Generate

func (g *Generator) Generate(ctx context.Context) (*scenario.Scenario, error)

Generate runs the LLM agent to create a scenario, retrying on validation failure. Agent execution errors (TagExternal, TagGeneration) cause immediate failure. Only validation errors (TagValidation) trigger retries.

type Option

type Option func(*Generator)

Option configures the Generator.

func WithLogger

func WithLogger(l *slog.Logger) Option

WithLogger sets the logger.

func WithMaxRetries

func WithMaxRetries(n int) Option

WithMaxRetries sets the maximum number of retries on validation failure.

func WithPrinter

func WithPrinter(p interfaces.Printer) Option

WithPrinter sets the CLI printer for generation progress.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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