config

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2026 License: Apache-2.0 Imports: 37 Imported by: 0

Documentation

Index

Constants

View Source
const Version = "1.0.0"

Variables

This section is empty.

Functions

func NewNoopEmbeddingClient added in v0.14.0

func NewNoopEmbeddingClient() interfaces.EmbeddingClient

NewNoopEmbeddingClient returns a no-op embedding client.

func NewNoopLLMClient added in v0.14.0

func NewNoopLLMClient() gollem.LLMClient

NewNoopLLMClient returns a no-op LLM client.

Types

type AsyncAlertHook added in v0.3.0

type AsyncAlertHook struct {
	Raw    bool
	PubSub bool
	SNS    bool
}

AsyncAlertHook represents configuration for asynchronous alert hooks

func (*AsyncAlertHook) Flags added in v0.3.0

func (cfg *AsyncAlertHook) Flags() []cli.Flag

Flags returns CLI flags for async alert hook configuration

func (*AsyncAlertHook) Parse added in v0.3.0

func (cfg *AsyncAlertHook) Parse(ctx *cli.Command) error

Parse parses CLI context and sets configuration values

type CircuitBreaker added in v0.14.0

type CircuitBreaker struct {
	Enabled bool
	Window  time.Duration
	Limit   int
}

CircuitBreaker represents configuration for alert circuit breaker

func (*CircuitBreaker) Flags added in v0.14.0

func (cfg *CircuitBreaker) Flags() []cli.Flag

Flags returns CLI flags for circuit breaker configuration

func (*CircuitBreaker) ToConfig added in v0.14.0

func (cfg *CircuitBreaker) ToConfig() circuitbreaker.Config

ToConfig converts to circuitbreaker.Config

type ClaudeCfg added in v0.1.0

type ClaudeCfg struct {
	ProjectID string
	// contains filtered or unexported fields
}

func (*ClaudeCfg) Configure added in v0.1.0

func (x *ClaudeCfg) Configure(ctx context.Context) (*claude.VertexClient, error)

func (*ClaudeCfg) Flags added in v0.1.0

func (x *ClaudeCfg) Flags() []cli.Flag

type CommandConfig added in v0.11.0

type CommandConfig struct {
	Command string            `yaml:"command"`
	Args    []string          `yaml:"args,omitempty"`
	Env     map[string]string `yaml:"env,omitempty"`
}

CommandConfig represents a common command execution configuration shared between local MCP servers and credential helpers.

type CompositeLLMClient added in v0.1.0

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

func NewCompositeLLMClient added in v0.1.0

func NewCompositeLLMClient(contentClient, embeddingClient gollem.LLMClient) *CompositeLLMClient

func (*CompositeLLMClient) GenerateEmbedding added in v0.1.0

func (c *CompositeLLMClient) GenerateEmbedding(ctx context.Context, dimension int, input []string) ([][]float64, error)

func (*CompositeLLMClient) NewSession added in v0.1.0

func (c *CompositeLLMClient) NewSession(ctx context.Context, options ...gollem.SessionOption) (gollem.Session, error)

type Firestore

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

func (*Firestore) Configure

func (c *Firestore) Configure(ctx context.Context) (*repository.Firestore, error)

func (*Firestore) DatabaseID added in v0.5.0

func (c *Firestore) DatabaseID() string

DatabaseID returns the database ID (exported for migrate command)

func (*Firestore) Flags

func (c *Firestore) Flags() []cli.Flag

func (*Firestore) IsConfigured added in v0.1.0

func (c *Firestore) IsConfigured() bool

IsConfigured returns true if Firestore is configured

func (Firestore) LogValue

func (c Firestore) LogValue() slog.Value

func (*Firestore) ProjectID added in v0.1.0

func (c *Firestore) ProjectID() string

ProjectID returns the project ID (exported for serve command)

type GeminiCfg

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

func (*GeminiCfg) Configure

func (x *GeminiCfg) Configure(ctx context.Context) (*gemini.Client, error)

func (*GeminiCfg) Flags

func (x *GeminiCfg) Flags() []cli.Flag

func (GeminiCfg) LogValue

func (x GeminiCfg) LogValue() slog.Value

type GenAI added in v0.4.0

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

GenAI represents configuration for GenAI functionality including prompt templates

func (*GenAI) Flags added in v0.4.0

func (x *GenAI) Flags() []cli.Flag

Flags returns CLI flags for GenAI configuration

func (*GenAI) GetPromptDir added in v0.4.0

func (x *GenAI) GetPromptDir() string

GetPromptDir returns the configured prompt directory path

func (*GenAI) IsConfigured added in v0.4.0

func (x *GenAI) IsConfigured() bool

IsConfigured returns true if prompt directory is configured

func (GenAI) LogValue added in v0.4.0

func (x GenAI) LogValue() slog.Value

LogValue returns a structured log value for GenAI configuration

type LLMCfg added in v0.1.0

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

func (*LLMCfg) Configure added in v0.1.0

func (x *LLMCfg) Configure(ctx context.Context) (gollem.LLMClient, error)

Configure creates and returns an LLM client, preferring Claude if configured

func (*LLMCfg) ConfigureEmbeddingClient added in v0.1.0

func (x *LLMCfg) ConfigureEmbeddingClient(ctx context.Context) (interfaces.EmbeddingClient, error)

ConfigureEmbeddingClient creates and returns an embedding client adapter from the configured LLM client

func (*LLMCfg) Flags added in v0.1.0

func (x *LLMCfg) Flags() []cli.Flag

func (*LLMCfg) GetActiveProvider added in v0.1.0

func (x *LLMCfg) GetActiveProvider() string

GetActiveProvider returns the name of the active LLM provider

func (*LLMCfg) IsClaudeConfigured added in v0.1.0

func (x *LLMCfg) IsClaudeConfigured() bool

IsClaudeConfigured returns true if Claude configuration is available

func (*LLMCfg) IsGeminiConfigured added in v0.1.0

func (x *LLMCfg) IsGeminiConfigured() bool

IsGeminiConfigured returns true if Gemini configuration is available

func (LLMCfg) LogValue added in v0.1.0

func (x LLMCfg) LogValue() slog.Value

type Logger

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

func (*Logger) Configure

func (x *Logger) Configure() (func(), error)

Configure sets up logger and returns closer function and error. You can call closer even if error is not nil.

func (*Logger) Flags

func (x *Logger) Flags() []cli.Flag

func (Logger) LogValue

func (x Logger) LogValue() slog.Value

type MCPConfig added in v0.1.0

type MCPConfig struct {
	Servers []MCPServerConfig `yaml:"servers,omitempty"`
	Local   []MCPLocalConfig  `yaml:"local,omitempty"`
	// contains filtered or unexported fields
}

MCPConfig represents MCP configuration

func (*MCPConfig) CreateMCPClients added in v0.1.0

func (x *MCPConfig) CreateMCPClients(ctx context.Context) ([]*mcp.Client, error)

CreateMCPClients creates MCP clients based on the configuration

func (*MCPConfig) CreateMCPToolSets added in v0.1.0

func (x *MCPConfig) CreateMCPToolSets(ctx context.Context) ([]gollem.ToolSet, error)

CreateMCPToolSets creates gollem tool sets from MCP clients

func (*MCPConfig) Flags added in v0.1.0

func (x *MCPConfig) Flags() []cli.Flag

func (*MCPConfig) GetServerNames added in v0.1.0

func (x *MCPConfig) GetServerNames() []string

GetServerNames returns a list of configured server names (both servers and local)

func (*MCPConfig) IsConfigured added in v0.1.0

func (x *MCPConfig) IsConfigured() bool

IsConfigured returns true if MCP configuration file is specified

func (*MCPConfig) LoadConfig added in v0.1.0

func (x *MCPConfig) LoadConfig() error

LoadConfig loads MCP configuration from the specified YAML file

func (MCPConfig) LogValue added in v0.1.0

func (x MCPConfig) LogValue() slog.Value

type MCPLocalConfig added in v0.1.0

type MCPLocalConfig struct {
	Name          string `yaml:"name"`
	CommandConfig `yaml:",inline"`
	Disabled      bool `yaml:"disabled,omitempty"`
}

MCPLocalConfig represents configuration for a local MCP server

type MCPServerConfig added in v0.1.0

type MCPServerConfig struct {
	Name     string            `yaml:"name"`
	Type     string            `yaml:"type"` // "sse" or "http"
	URL      string            `yaml:"url"`
	Headers  map[string]string `yaml:"headers,omitempty"`
	Helper   *CommandConfig    `yaml:"helper,omitempty"`
	Disabled bool              `yaml:"disabled,omitempty"`
}

MCPServerConfig represents configuration for a remote MCP server

type Policy

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

func (*Policy) Configure

func (x *Policy) Configure() (*opaq.Client, error)

func (*Policy) Flags

func (x *Policy) Flags() []cli.Flag

func (*Policy) HasPolicies added in v0.1.0

func (x *Policy) HasPolicies() bool

func (Policy) LogValue

func (x Policy) LogValue() slog.Value

type PromptEntry added in v0.15.0

type PromptEntry struct {
	ID          string // frontmatter id (required, unique)
	Name        string // frontmatter name (required, human-readable display name)
	Description string // frontmatter description (required)
	Content     string // markdown body after frontmatter
	FilePath    string // source file path (for debugging/logging)
}

PromptEntry represents a user-defined system prompt loaded from a markdown file.

type Sentry

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

func (*Sentry) Configure

func (x *Sentry) Configure() error

func (*Sentry) Flags

func (x *Sentry) Flags() []cli.Flag

func (Sentry) LogValue

func (x Sentry) LogValue() slog.Value

type Slack

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

func (*Slack) Configure

func (x *Slack) Configure() (*slack.Service, error)

func (*Slack) ConfigureOptional added in v0.1.0

func (x *Slack) ConfigureOptional() (*slack.Service, error)

ConfigureOptional returns a Slack service if configured, or nil if not configured

func (*Slack) ConfigureOptionalWithFrontendURL added in v0.1.0

func (x *Slack) ConfigureOptionalWithFrontendURL(frontendURL string) (*slack.Service, error)

ConfigureOptionalWithFrontendURL returns a Slack service if configured, or nil if not configured

func (*Slack) ConfigureWithFrontendURL

func (x *Slack) ConfigureWithFrontendURL(frontendURL string) (*slack.Service, error)

func (*Slack) Flags

func (x *Slack) Flags() []cli.Flag

func (*Slack) IsConfigured added in v0.1.0

func (x *Slack) IsConfigured() bool

IsConfigured checks if Slack configuration is complete

func (Slack) LogValue

func (x Slack) LogValue() slog.Value

func (*Slack) Verifier

func (x *Slack) Verifier() model.PayloadVerifier

type Storage

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

func (*Storage) Bucket added in v0.1.0

func (x *Storage) Bucket() string

Bucket returns the bucket name (exported for serve command)

func (*Storage) Configure

func (x *Storage) Configure(ctx context.Context) (*storage.Client, error)

func (*Storage) Flags

func (x *Storage) Flags() []cli.Flag

func (*Storage) IsConfigured added in v0.1.0

func (x *Storage) IsConfigured() bool

IsConfigured returns true if Storage is configured

func (*Storage) LogValue

func (x *Storage) LogValue() slog.Value

func (*Storage) Prefix added in v0.6.0

func (x *Storage) Prefix() string

Prefix returns the storage prefix (exported for serve command)

type StrategySystemPrompts added in v0.15.0

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

StrategySystemPrompts holds CLI configuration for loading multiple user system prompt files.

func NewStrategySystemPrompts added in v0.15.0

func NewStrategySystemPrompts(dirPath string) *StrategySystemPrompts

NewStrategySystemPrompts creates a StrategySystemPrompts with the given directory path. This is primarily for testing; in production, use Flags() to configure via CLI.

func (*StrategySystemPrompts) Configure added in v0.15.0

func (x *StrategySystemPrompts) Configure() ([]PromptEntry, error)

Configure reads all .md files in the configured directory and returns parsed PromptEntry slice. Returns empty slice if no directory is configured. Returns error if the directory doesn't exist, files are malformed, or ids are duplicated.

func (*StrategySystemPrompts) Flags added in v0.15.0

func (x *StrategySystemPrompts) Flags() []cli.Flag

Flags returns CLI flags for user system prompts configuration.

type TestData

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

func (*TestData) Configure

func (x *TestData) Configure() (*policy.TestDataSet, error)

func (*TestData) DetectDataPath

func (x *TestData) DetectDataPath() string

func (*TestData) Flags

func (x *TestData) Flags() []cli.Flag

func (*TestData) IgnoreDataPath

func (x *TestData) IgnoreDataPath() string

func (TestData) LogValue

func (x TestData) LogValue() slog.Value

type Trace added in v0.9.0

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

Trace holds CLI configuration for trace data storage.

func (*Trace) Configure added in v0.9.0

func (x *Trace) Configure(ctx context.Context) (*traceAdapter.Repository, error)

Configure creates a GCS Trace Repository if bucket is configured. Returns nil if trace-bucket is not set (tracing disabled).

func (*Trace) Flags added in v0.9.0

func (x *Trace) Flags() []cli.Flag

Flags returns CLI flags for trace configuration.

func (*Trace) IsConfigured added in v0.9.0

func (x *Trace) IsConfigured() bool

IsConfigured returns true if trace storage is configured.

func (*Trace) LogValue added in v0.9.0

func (x *Trace) LogValue() slog.Value

LogValue returns structured log representation.

type UserSystemPrompt added in v0.12.0

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

UserSystemPrompt holds CLI configuration for user system prompt file.

func (*UserSystemPrompt) Configure added in v0.12.0

func (x *UserSystemPrompt) Configure() (string, error)

Configure reads the user system prompt file and returns its content. Returns empty string if no file path is configured.

func (*UserSystemPrompt) Flags added in v0.12.0

func (x *UserSystemPrompt) Flags() []cli.Flag

Flags returns CLI flags for user system prompt configuration.

type WebUI

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

func (*WebUI) Configure

func (x *WebUI) Configure(ctx context.Context, repo interfaces.Repository, slackSvc *slack.Service) (usecase.AuthUseCaseInterface, error)

func (*WebUI) Flags

func (x *WebUI) Flags() []cli.Flag

func (*WebUI) GetCallbackURL

func (x *WebUI) GetCallbackURL() string

func (*WebUI) GetFrontendURL

func (x *WebUI) GetFrontendURL() string

func (*WebUI) IsConfigured

func (x *WebUI) IsConfigured() bool

func (WebUI) LogValue

func (x WebUI) LogValue() slog.Value

func (*WebUI) SetFrontendURL added in v0.1.0

func (x *WebUI) SetFrontendURL(url string)

SetFrontendURL sets the frontend URL

Jump to

Keyboard shortcuts

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