app

package
v0.12.1 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2026 License: MIT Imports: 22 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadEnv

func LoadEnv() error

LoadEnv loads .env file from current working directory. Silently ignores if file not found, returns error for other failures.

func NewArtifactStorage added in v0.10.0

func NewArtifactStorage(ctx context.Context, cfg *config.Config, logger *slog.Logger) (files.Storage, error)

NewArtifactStorage selects the artifact blob backend from config: an artifacts.s3 block switches to S3, otherwise the local disk store backs StoragePath. Capability-driven, so the home deployment (no s3 block) is byte-identical to before.

Types

type Services

type Services struct {
	// All agents
	EnricherAgent  *enricher.Enricher
	ReactorAgent   *reactor.Reactor
	SplitterAgent  *splitter.Splitter
	MergerAgent    *merger.Merger
	ArchivistAgent *archivist.Archivist
	RerankerAgent  *reranker.Reranker
	ExtractorAgent *extractor.Extractor
	LaplaceAgent   *laplace.Laplace

	// Services
	MemoryService  *memory.Service
	RAGService     *rag.Service
	ContextService *agent.ContextService
	AgentLogger    *agentlog.Logger
	AgentExecutor  *agent.Executor
	Translator     *i18n.Translator
	FileStorage    files.Storage
	LLMClient      llm.Client
}

Services holds all initialized services and agents. This struct is returned by SetupServices to provide all dependencies in a single call, eliminating code duplication between main bot and testbot.

func SetupServices

func SetupServices(
	ctx context.Context,
	logger *slog.Logger,
	cfg *config.Config,
	store *storage.Store,
	client llm.Client,
	translator *i18n.Translator,
) (*Services, error)

SetupServices initializes all core services and agents. This function is called by both the main bot and testbot to eliminate ~150 lines of duplicated code.

The caller is responsible for: - Starting the RAG service (ragService.Start(ctx)) - Stopping services when done (ragService.Stop(), store.Close())

Jump to

Keyboard shortcuts

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