env

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2026 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Overview

Package env builds the in-memory environment a scenario runs against: a memory repository (seeded with the scenario's prior cases), in-memory history and trace repositories, the system-under-test wired via usecase.New, a recording fake Slack service, and per-tool clients that are either simulated (ToolSimulator) or live (recorded). It exposes the AgentUseCase entrypoints the driver drives, plus the fake Slack, the tool-call recorder, and the trace repository for diagnostic dumps.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Env

type Env struct {
	AgentUC        *usecase.AgentUseCase
	JobRunner      *job.JobRunner
	Repo           interfaces.Repository
	Registry       *model.WorkspaceRegistry
	Entry          *model.WorkspaceEntry
	Slack          *fakeSlack
	Recorder       *toolsim.Recorder
	Trace          *agentarchive.MemoryTraceRepository
	SeededCases    []*model.Case
	MonitorChannel string
	Language       string
}

Env is a prepared single-scenario environment.

func Build

func Build(ctx context.Context, sc *scenario.Scenario, opts Options) (*Env, error)

Build assembles the environment for one scenario.

type Options

type Options struct {
	// LLM is the system-under-test agent's LLM client (required).
	LLM gollem.LLMClient
	// Completer drives the simulated tools (required when any tool is sim).
	Completer evaltype.Completer
	// Live* are real tool clients, used for tools marked live=true. Nil unless
	// the corresponding live tool is requested.
	LiveSlackSearch slacktool.SearchService
	LiveNotion      notiontool.Client
	GitHub          *githubtool.Client
	// WebFetch holds the live-only webfetch HTTP settings; the eval LLM is
	// injected as the screening client when the tool is built.
	WebFetch *webfetch.ClientConfig
	// JiraTools carries the already-expanded Jira read tools (see
	// pkg/agent/tool/jira). Live-only, like GitHub.
	JiraTools []gollem.Tool
}

Options carries the externally-provided dependencies needed to build an env.

type Post

type Post struct {
	Kind      string // "thread_reply" | "thread_message" | "message"
	ChannelID string
	ThreadTS  string
	Text      string
	TS        string
}

Post is one recorded outbound message from the agent.

Jump to

Keyboard shortcuts

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