Documentation
¶
Index ¶
- Constants
- type AccessPattern
- type Alert
- type AlertChannel
- type AlertLevel
- type AlertManager
- type AlertSeverity
- type AuditLogger
- type BatchItem
- type BatchProcessor
- type BatchProcessorConfig
- type BatchResult
- type CacheConfig
- type CacheService
- type CachedItem
- type CircuitBreakerConfig
- type ClassificationRule
- type CompensationFunc
- type ContentAnalysis
- type ContentAnalyzer
- type ContentMetadata
- type ContentType
- type CostAlert
- type CostBreakdown
- type CostCheckRequest
- type CostCheckResponse
- type CostControlConfig
- type CostControlDependencies
- type CostController
- func (c *CostController) CheckBudget(ctx context.Context, req CostCheckRequest) (*CostCheckResponse, error)
- func (c *CostController) GetCostBreakdown(ctx context.Context, executionID uuid.UUID) (*CostBreakdown, error)
- func (c *CostController) GetTenantUsage(ctx context.Context, tenantID uuid.UUID, period TimePeriod) (*UsageSummary, error)
- func (c *CostController) RecordCost(ctx context.Context, record CostRecord) error
- type CostMetricsCollector
- type CostRateTable
- type CostRecord
- type CostRepository
- type DataClassification
- type DataClassifier
- type DynamicToolRepository
- type DynamicToolsIntegration
- type EmbeddingService
- type EmbeddingServiceAdapter
- type Encryptor
- type Entity
- type Event
- type EventStore
- type ExecutionCheckpoint
- type ExecutionMetrics
- type ExecutionMetricsCollector
- type ExecutionMode
- type ExecutionRequest
- type ExecutionResponse
- type HTTPConnectionPool
- type IntegrationConfig
- type IntegrationDependencies
- type IntelligenceMetadata
- type IntelligenceResult
- type Logger
- type MetricsCollector
- func (m *MetricsCollector) RecordConcurrencyLimitExceeded()
- func (m *MetricsCollector) RecordError(err error, labels ...interface{})
- func (m *MetricsCollector) RecordExecutionDuration(duration interface{}, labels ...interface{})
- func (m *MetricsCollector) RecordRateLimitExceeded()
- func (m *MetricsCollector) RecordSLOViolation(name string, duration interface{})
- func (m *MetricsCollector) RecordSuccess(labels ...interface{})
- type OperationUsage
- type OptimizationDependencies
- type PIIDetector
- type PerformanceConfig
- type PerformanceMetricsCollector
- type PerformanceOptimizer
- func (p *PerformanceOptimizer) BatchExecute(ctx context.Context, items []BatchItem) ([]BatchResult, error)
- func (p *PerformanceOptimizer) GetWithCache(ctx context.Context, key string, loader func() (interface{}, error)) (interface{}, error)
- func (p *PerformanceOptimizer) OptimizeQuery(ctx context.Context, query QueryRequest) (*QueryResult, error)
- type PrefetchRequest
- type Prefetcher
- type PrefetcherConfig
- type QueryRequest
- type QueryResult
- type RateLimitConfig
- type ResilientExecutionService
- type RetryConfig
- type SLOConfig
- type SLOMonitor
- type SLOTargets
- type SecretScanner
- type SecurityAuditEvent
- type SecurityConfig
- type SecurityLayer
- type SecurityMetricsCollector
- type SecurityValidation
- type SemanticGraphService
- type SemanticLink
- type SentimentAnalysis
- type ServiceConfig
- type ServiceDependencies
- type StageCheckpoint
- type StageStatus
- type TenantBudget
- type TimePeriod
- type ToolExecutionRequest
- type ToolExecutionResponse
- type ToolExecutor
- type ToolResult
- type ToolUsage
- type Topic
- type UsageBreakdown
- type UsageSummary
- type UsageTrends
Constants ¶
const ( EventExecutionQueued = "execution.queued" EventExecutionStarted = "execution.started" EventExecutionComplete = "execution.complete" EventExecutionFailed = "execution.failed" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccessPattern ¶
type Alert ¶
type Alert struct {
Severity AlertSeverity
Title string
Message string
Labels []attribute.KeyValue
}
type AlertChannel ¶
type AlertLevel ¶
type AlertLevel string
const ( AlertLevelInfo AlertLevel = "info" AlertLevelWarning AlertLevel = "warning" AlertLevelCritical AlertLevel = "critical" )
type AlertManager ¶
type AlertManager struct {
// contains filtered or unexported fields
}
func NewAlertManager ¶
func NewAlertManager(channels []AlertChannel, logger interface{}) *AlertManager
func (*AlertManager) SendAlert ¶
func (m *AlertManager) SendAlert(alert Alert)
type AlertSeverity ¶
type AlertSeverity string
const ( AlertSeverityInfo AlertSeverity = "info" AlertSeverityWarning AlertSeverity = "warning" AlertSeverityCritical AlertSeverity = "critical" )
type AuditLogger ¶
type AuditLogger interface {
LogSecurityEvent(ctx context.Context, event SecurityAuditEvent)
}
type BatchProcessor ¶
type BatchProcessor struct{}
func NewBatchProcessor ¶
func NewBatchProcessor(config BatchProcessorConfig) *BatchProcessor
func (*BatchProcessor) ProcessBatch ¶
func (b *BatchProcessor) ProcessBatch(ctx context.Context, items []BatchItem) ([]BatchResult, error)
type BatchProcessorConfig ¶
type BatchResult ¶
type CacheConfig ¶
type CacheConfig struct {
EnableL1 bool
EnableL2 bool
TTL time.Duration
MaxSize int
EvictionPolicy string // "lru", "lfu", "arc"
CompressionLevel int // 0-9
}
CacheConfig defines cache behavior
type CacheService ¶
type CachedItem ¶
type CachedItem struct {
Value interface{}
Expiration time.Time
Version int
Metadata map[string]interface{}
}
func (CachedItem) IsExpired ¶
func (c CachedItem) IsExpired() bool
type CircuitBreakerConfig ¶
type ClassificationRule ¶
type ClassificationRule struct {
Name string
Pattern *regexp.Regexp
Keywords []string
Classification DataClassification
}
ClassificationRule defines a classification rule
type CompensationFunc ¶
type ContentAnalysis ¶
type ContentAnalysis struct {
ContentType ContentType
Metadata *ContentMetadata
Entities []Entity
Topics []Topic
Keywords []string
Summary string
Language string
}
type ContentAnalyzer ¶
type ContentAnalyzer interface {
Analyze(ctx context.Context, content []byte) (*ContentAnalysis, error)
}
type ContentMetadata ¶
type ContentType ¶
type ContentType string
const ( ContentTypeText ContentType = "text" ContentTypeCode ContentType = "code" ContentTypeJSON ContentType = "json" ContentTypeHTML ContentType = "html" ContentTypeMarkdown ContentType = "markdown" ContentTypeAPI ContentType = "api_response" ContentTypeDocumentation ContentType = "documentation" ContentTypeUnknown ContentType = "unknown" )
type CostBreakdown ¶
type CostCheckRequest ¶
type CostCheckResponse ¶
type CostControlConfig ¶
type CostControlConfig struct {
// Global limits
GlobalDailyLimit float64
GlobalMonthlyLimit float64
// Alert thresholds
WarningThreshold float64 // 0.8 = alert at 80% of budget
CriticalThreshold float64 // 0.95 = critical at 95%
// Rate limits
EnableRateLimiting bool
CostPerMinute float64 // Max cost per minute per tenant
// Tracking
TrackingGranularity string // "execution", "hourly", "daily"
RetentionDays int
// Enforcement
StrictEnforcement bool // Block when budget exceeded
GracePeriodMinutes int // Allow temporary overages
}
CostControlConfig contains cost control configuration
type CostControlDependencies ¶
type CostControlDependencies struct {
DB *sql.DB
Repository CostRepository
Logger observability.Logger
}
CostControlDependencies for NewCostController
type CostController ¶
type CostController struct {
// contains filtered or unexported fields
}
CostController manages cost tracking and budget enforcement
func NewCostController ¶
func NewCostController(config CostControlConfig, deps CostControlDependencies) (*CostController, error)
NewCostController creates a new cost controller
func (*CostController) CheckBudget ¶
func (c *CostController) CheckBudget(ctx context.Context, req CostCheckRequest) (*CostCheckResponse, error)
CheckBudget checks if an operation can proceed within budget
func (*CostController) GetCostBreakdown ¶
func (c *CostController) GetCostBreakdown(ctx context.Context, executionID uuid.UUID) (*CostBreakdown, error)
GetCostBreakdown returns detailed cost breakdown for an execution
func (*CostController) GetTenantUsage ¶
func (c *CostController) GetTenantUsage(ctx context.Context, tenantID uuid.UUID, period TimePeriod) (*UsageSummary, error)
GetTenantUsage returns usage summary for a tenant
func (*CostController) RecordCost ¶
func (c *CostController) RecordCost(ctx context.Context, record CostRecord) error
RecordCost records actual cost after execution
type CostMetricsCollector ¶
type CostMetricsCollector struct {
// contains filtered or unexported fields
}
func NewCostMetricsCollector ¶
func NewCostMetricsCollector(meter interface{}) *CostMetricsCollector
func (*CostMetricsCollector) GetStats ¶
func (c *CostMetricsCollector) GetStats() map[string]interface{}
type CostRateTable ¶
type CostRateTable struct {
ToolRates map[string]decimal.Decimal
EmbeddingRates map[string]decimal.Decimal
AnalysisRates map[string]decimal.Decimal
StorageRate decimal.Decimal
}
func NewCostRateTable ¶
func NewCostRateTable() *CostRateTable
func (*CostRateTable) GetAnalysisRate ¶
func (c *CostRateTable) GetAnalysisRate(model string) decimal.Decimal
func (*CostRateTable) GetEmbeddingRate ¶
func (c *CostRateTable) GetEmbeddingRate(model string) decimal.Decimal
func (*CostRateTable) GetStorageRate ¶
func (c *CostRateTable) GetStorageRate() decimal.Decimal
func (*CostRateTable) GetToolRate ¶
func (c *CostRateTable) GetToolRate(toolType string) decimal.Decimal
type CostRecord ¶
type CostRecord struct {
ExecutionID uuid.UUID
TenantID uuid.UUID
ToolExecution bool
ToolType string
EmbeddingTokens int
EmbeddingModel string
AnalysisTokens int
AnalysisModel string
StorageMB float64
}
CostRecord for RecordCost
type CostRepository ¶
type CostRepository interface {
StoreCost(ctx context.Context, record CostRecord, breakdown *CostBreakdown) error
GetCostBreakdown(ctx context.Context, executionID uuid.UUID) (*CostBreakdown, error)
GetUsageBreakdown(ctx context.Context, tenantID uuid.UUID, period TimePeriod) (*UsageBreakdown, error)
GetTenantBudget(ctx context.Context, tenantID uuid.UUID) (*TenantBudget, error)
GetAllTenantBudgets(ctx context.Context) ([]*TenantBudget, error)
IsInGracePeriod(ctx context.Context, tenantID uuid.UUID) (bool, error)
StoreAlert(ctx context.Context, alert CostAlert) error
}
type DataClassification ¶
type DataClassification int
DataClassification levels
const ( ClassificationPublic DataClassification = iota ClassificationInternal ClassificationConfidential ClassificationRestricted )
type DataClassifier ¶
type DataClassifier struct {
// contains filtered or unexported fields
}
DataClassifier classifies data sensitivity
func NewDataClassifier ¶
func NewDataClassifier() *DataClassifier
NewDataClassifier creates a new data classifier
func (*DataClassifier) Classify ¶
func (c *DataClassifier) Classify(content []byte) DataClassification
Classify determines data classification
type DynamicToolRepository ¶
type DynamicToolsIntegration ¶
type DynamicToolsIntegration struct {
// contains filtered or unexported fields
}
DynamicToolsIntegration integrates intelligence with the DynamicToolsService
func NewDynamicToolsIntegration ¶
func NewDynamicToolsIntegration( config IntegrationConfig, deps IntegrationDependencies, ) (*DynamicToolsIntegration, error)
NewDynamicToolsIntegration creates the integration layer
func (*DynamicToolsIntegration) ExecuteToolActionWithIntelligence ¶
func (i *DynamicToolsIntegration) ExecuteToolActionWithIntelligence( ctx context.Context, request ToolExecutionRequest, ) (*ToolExecutionResponse, error)
ExecuteToolActionWithIntelligence wraps tool execution with intelligence processing
type EmbeddingService ¶
type EmbeddingService interface {
GenerateEmbedding(ctx context.Context, content string, metadata map[string]interface{}) (*uuid.UUID, error)
}
EmbeddingService is a wrapper interface for the embedding service
func NewEmbeddingServiceAdapter ¶
func NewEmbeddingServiceAdapter(service *embedding.ServiceV2, tenantID uuid.UUID, agentID *uuid.UUID) EmbeddingService
NewEmbeddingServiceAdapter creates a new adapter
type EmbeddingServiceAdapter ¶
type EmbeddingServiceAdapter struct {
// contains filtered or unexported fields
}
EmbeddingServiceAdapter adapts the embedding.ServiceV2 to our EmbeddingService interface
func (*EmbeddingServiceAdapter) GenerateEmbedding ¶
func (a *EmbeddingServiceAdapter) GenerateEmbedding(ctx context.Context, content string, metadata map[string]interface{}) (*uuid.UUID, error)
GenerateEmbedding implements the EmbeddingService interface
type Encryptor ¶
type Encryptor struct {
// contains filtered or unexported fields
}
Encryptor provides encryption services
type EventStore ¶
type ExecutionCheckpoint ¶
type ExecutionCheckpoint struct {
ID uuid.UUID
StartTime time.Time
Request ExecutionRequest
Stages map[string]StageCheckpoint
LastUpdate time.Time
}
type ExecutionMetrics ¶
type ExecutionMetricsCollector ¶
type ExecutionMetricsCollector struct {
// contains filtered or unexported fields
}
func NewExecutionMetricsCollector ¶
func NewExecutionMetricsCollector(meter interface{}) *ExecutionMetricsCollector
func (*ExecutionMetricsCollector) GetStats ¶
func (c *ExecutionMetricsCollector) GetStats() map[string]interface{}
type ExecutionMode ¶
type ExecutionMode string
ExecutionMode defines how the execution should be processed
const ( ModeSync ExecutionMode = "sync" // Wait for everything ModeAsync ExecutionMode = "async" // Return immediately, process in background ModeHybrid ExecutionMode = "hybrid" // Return tool result, async intelligence )
type ExecutionRequest ¶
type ExecutionResponse ¶
type ExecutionResponse struct {
ExecutionID uuid.UUID
ToolResult interface{}
Intelligence IntelligenceMetadata
ContextID uuid.UUID
RelatedContexts []uuid.UUID
Metrics ExecutionMetrics
}
type HTTPConnectionPool ¶
type HTTPConnectionPool struct {
// contains filtered or unexported fields
}
func NewHTTPConnectionPool ¶
func NewHTTPConnectionPool(maxConns int) *HTTPConnectionPool
func (*HTTPConnectionPool) Acquire ¶
func (p *HTTPConnectionPool) Acquire()
func (*HTTPConnectionPool) Release ¶
func (p *HTTPConnectionPool) Release()
type IntegrationConfig ¶
type IntegrationConfig struct {
// Feature flags
AutoEmbedding bool
IntelligenceEnabled bool
SecurityChecks bool
CostTracking bool
// Execution modes
DefaultMode ExecutionMode
AsyncThreshold int // Use async for results > this size
// Performance
CacheEnabled bool
BatchingEnabled bool
}
IntegrationConfig contains integration configuration
type IntegrationDependencies ¶
type IntegrationDependencies struct {
ToolExecutor ToolExecutor
ContentAnalyzer ContentAnalyzer
EmbeddingService EmbeddingService // Use the interface, not the concrete type
SemanticGraph SemanticGraphService
DynamicToolsRepo DynamicToolRepository
DB *sql.DB
CacheService CacheService
EventStore EventStore
Logger observability.Logger
MetricsClient observability.MetricsClient
}
type IntelligenceMetadata ¶
type IntelligenceMetadata struct {
ContentType ContentType
Entities []Entity
Topics []Topic
Keywords []string
Summary string
Sentiment SentimentAnalysis
Language string
Classification DataClassification
}
type IntelligenceResult ¶
type IntelligenceResult struct {
Metadata IntelligenceMetadata
EmbeddingID *uuid.UUID
RelatedContexts []uuid.UUID
SemanticLinks []SemanticLink
EmbeddingDuration time.Duration
TokensUsed int
Cost float64
}
type Logger ¶
type Logger = observability.Logger
Logger is an alias for the observability.Logger interface
type MetricsCollector ¶
type MetricsCollector struct{}
MetricsCollector stub for service.go
func NewMetricsCollector ¶
func NewMetricsCollector(meter interface{}) (*MetricsCollector, error)
func (*MetricsCollector) RecordConcurrencyLimitExceeded ¶
func (m *MetricsCollector) RecordConcurrencyLimitExceeded()
func (*MetricsCollector) RecordError ¶
func (m *MetricsCollector) RecordError(err error, labels ...interface{})
func (*MetricsCollector) RecordExecutionDuration ¶
func (m *MetricsCollector) RecordExecutionDuration(duration interface{}, labels ...interface{})
func (*MetricsCollector) RecordRateLimitExceeded ¶
func (m *MetricsCollector) RecordRateLimitExceeded()
func (*MetricsCollector) RecordSLOViolation ¶
func (m *MetricsCollector) RecordSLOViolation(name string, duration interface{})
func (*MetricsCollector) RecordSuccess ¶
func (m *MetricsCollector) RecordSuccess(labels ...interface{})
type OperationUsage ¶
type OptimizationDependencies ¶
type OptimizationDependencies struct {
RedisClient *redis.Client
CacheConfig CacheConfig
DBPool *sql.DB
Logger observability.Logger
}
Performance optimizer dependencies
type PIIDetector ¶
type PIIDetector struct {
// contains filtered or unexported fields
}
PIIDetector detects personally identifiable information
func (*PIIDetector) Detect ¶
func (d *PIIDetector) Detect(content []byte) []string
Detect finds PII in content
type PerformanceConfig ¶
type PerformanceConfig struct {
// Cache settings
L1CacheSize int
L2CacheTTL time.Duration
CacheWarmup bool
// Batching settings
BatchSize int
BatchTimeout time.Duration
MaxBatchWait time.Duration
// Connection pool settings
DBMaxConns int
DBMaxIdleConns int
RedisPoolSize int
HTTPMaxConns int
// Prefetch settings
PrefetchEnabled bool
PrefetchThreshold float64 // 0.8 = prefetch when 80% likely
PrefetchWorkers int
}
PerformanceConfig contains performance optimization settings
type PerformanceMetricsCollector ¶
type PerformanceMetricsCollector struct {
// contains filtered or unexported fields
}
func NewPerformanceMetricsCollector ¶
func NewPerformanceMetricsCollector(meter interface{}) *PerformanceMetricsCollector
func (*PerformanceMetricsCollector) GetStats ¶
func (c *PerformanceMetricsCollector) GetStats() map[string]interface{}
func (*PerformanceMetricsCollector) UpdateGauge ¶
func (c *PerformanceMetricsCollector) UpdateGauge(name string, value float64, labels ...attribute.KeyValue)
type PerformanceOptimizer ¶
type PerformanceOptimizer struct {
// contains filtered or unexported fields
}
PerformanceOptimizer manages caching, batching, and connection pooling
func NewPerformanceOptimizer ¶
func NewPerformanceOptimizer(config PerformanceConfig, deps OptimizationDependencies) (*PerformanceOptimizer, error)
NewPerformanceOptimizer creates a performance optimization layer
func (*PerformanceOptimizer) BatchExecute ¶
func (p *PerformanceOptimizer) BatchExecute(ctx context.Context, items []BatchItem) ([]BatchResult, error)
BatchExecute processes operations in batches
func (*PerformanceOptimizer) GetWithCache ¶
func (p *PerformanceOptimizer) GetWithCache(ctx context.Context, key string, loader func() (interface{}, error)) (interface{}, error)
GetWithCache retrieves data with multi-level caching
func (*PerformanceOptimizer) OptimizeQuery ¶
func (p *PerformanceOptimizer) OptimizeQuery(ctx context.Context, query QueryRequest) (*QueryResult, error)
OptimizeQuery optimizes database queries with caching and pooling
type PrefetchRequest ¶
type Prefetcher ¶
type Prefetcher struct{}
func NewPrefetcher ¶
func NewPrefetcher(config PrefetcherConfig) *Prefetcher
type PrefetcherConfig ¶
type PrefetcherConfig struct {
Workers int
Threshold float64
Logger observability.Logger
}
type QueryRequest ¶
type QueryResult ¶
type RateLimitConfig ¶
type ResilientExecutionService ¶
type ResilientExecutionService struct {
// contains filtered or unexported fields
}
ResilientExecutionService provides fault-tolerant tool execution with intelligence
func NewResilientExecutionService ¶
func NewResilientExecutionService(config *ServiceConfig, deps ServiceDependencies) (*ResilientExecutionService, error)
NewResilientExecutionService creates a production-ready execution service
func (*ResilientExecutionService) Execute ¶
func (s *ResilientExecutionService) Execute(ctx context.Context, req ExecutionRequest) (*ExecutionResponse, error)
Execute performs tool execution with intelligence processing
type RetryConfig ¶
type SLOConfig ¶
type SLOConfig struct {
P50LatencyMs float64 // 200ms
P99LatencyMs float64 // 500ms
ErrorRatePct float64 // 0.1%
AvailabilityPct float64 // 99.9%
}
SLOConfig defines service level objectives
type SLOMonitor ¶
type SLOMonitor struct {
// contains filtered or unexported fields
}
func NewSLOMonitor ¶
func NewSLOMonitor(targets SLOTargets, logger observability.Logger) *SLOMonitor
func (*SLOMonitor) CheckExecution ¶
func (m *SLOMonitor) CheckExecution(duration time.Duration, err error)
func (*SLOMonitor) Start ¶
func (m *SLOMonitor) Start()
type SLOTargets ¶
type SecretScanner ¶
type SecretScanner struct {
// contains filtered or unexported fields
}
SecretScanner scans for secrets and credentials
func NewSecretScanner ¶
func NewSecretScanner() *SecretScanner
NewSecretScanner creates a new secret scanner
func (*SecretScanner) Scan ¶
func (s *SecretScanner) Scan(content []byte) []string
Scan finds secrets in content
type SecurityAuditEvent ¶
type SecurityAuditEvent struct {
EventID uuid.UUID
EventType string
Timestamp time.Time
TenantID uuid.UUID
AgentID uuid.UUID
Classification DataClassification
PIIDetected bool
SecretsDetected bool
Passed bool
Details map[string]interface{}
}
SecurityAuditEvent represents a security audit event
type SecurityConfig ¶
type SecurityConfig struct {
EnablePIIDetection bool
EnableSecretScanning bool
EnableEncryption bool
EncryptionKey []byte
RedactPII bool
BlockOnSecrets bool
AuditEnabled bool
SensitivePatterns []string
}
SecurityConfig contains security configuration
type SecurityLayer ¶
type SecurityLayer struct {
// contains filtered or unexported fields
}
SecurityLayer provides security checks and data protection
func NewSecurityLayer ¶
func NewSecurityLayer(config SecurityConfig) *SecurityLayer
NewSecurityLayer creates a new security layer
func (*SecurityLayer) ValidateContent ¶
func (s *SecurityLayer) ValidateContent(ctx context.Context, content []byte) (*SecurityValidation, error)
ValidateContent performs security validation on content
type SecurityMetricsCollector ¶
type SecurityMetricsCollector struct {
// contains filtered or unexported fields
}
func NewSecurityMetricsCollector ¶
func NewSecurityMetricsCollector(meter interface{}) *SecurityMetricsCollector
func (*SecurityMetricsCollector) GetStats ¶
func (c *SecurityMetricsCollector) GetStats() map[string]interface{}
type SecurityValidation ¶
type SecurityValidation struct {
ID uuid.UUID
Timestamp time.Time
Passed bool
PIIDetected bool
PIITypes []string
SecretsDetected bool
SecretTypes []string
Classification DataClassification
ContentRedacted bool
BlockReason string
ProcessedContent []byte
}
SecurityValidation contains security validation results
type SemanticGraphService ¶
type SemanticGraphService interface {
AddNode(ctx context.Context, nodeID uuid.UUID, metadata map[string]interface{}) error
CreateRelationship(ctx context.Context, source, target uuid.UUID, relationship string) error
FindRelated(ctx context.Context, nodeID uuid.UUID, maxDistance int) ([]uuid.UUID, error)
}
type SemanticLink ¶
type SentimentAnalysis ¶
type ServiceConfig ¶
type ServiceConfig struct {
// Execution modes
DefaultMode ExecutionMode
EnableAsyncFallback bool
// Performance
MaxConcurrency int64
TimeoutSeconds int
CacheEnabled bool
CacheTTL time.Duration
// Resilience
CircuitBreakerConfig CircuitBreakerConfig
RetryConfig RetryConfig
RateLimitConfig RateLimitConfig
// Security
SecurityConfig SecurityConfig
// Cost
CostThresholdUSD float64
DailyBudgetUSD float64
}
ServiceConfig contains all configuration for the service
type ServiceDependencies ¶
type ServiceDependencies struct {
ToolExecutor ToolExecutor
ContentAnalyzer ContentAnalyzer
EmbeddingService EmbeddingService // Use the interface, not the concrete type
SemanticGraph SemanticGraphService
DB *sql.DB
Cache CacheService
EventStore EventStore
Logger observability.Logger
MetricsClient observability.MetricsClient
}
ServiceDependencies for NewResilientExecutionService
type StageCheckpoint ¶
type StageStatus ¶
type StageStatus string
const ( StageStatusPending StageStatus = "pending" StageStatusRunning StageStatus = "running" StageStatusCompleted StageStatus = "completed" StageStatusFailed StageStatus = "failed" StageStatusSkipped StageStatus = "skipped" )
type TenantBudget ¶
type ToolExecutionRequest ¶
type ToolExecutionResponse ¶
type ToolExecutionResponse struct {
ExecutionID uuid.UUID
Result interface{}
Intelligence IntelligenceMetadata
ContextID uuid.UUID
RelatedContexts []uuid.UUID
Duration time.Duration
Metrics ExecutionMetrics
}
type ToolExecutor ¶
type ToolResult ¶
type UsageBreakdown ¶
type UsageSummary ¶
type UsageSummary struct {
TenantID uuid.UUID
Period TimePeriod
DailySpend decimal.Decimal
MonthlySpend decimal.Decimal
DailyLimit decimal.Decimal
MonthlyLimit decimal.Decimal
Breakdown *UsageBreakdown
Trends *UsageTrends
TopOperations []OperationUsage
Recommendations []string
}