management

package
v0.5.21 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2026 License: Apache-2.0 Imports: 54 Imported by: 0

Documentation

Overview

Package management provides the management API handlers and middleware for configuring the server and managing auth files.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompleteOAuthSession

func CompleteOAuthSession(state string)

func CompleteOAuthSessionsByProvider

func CompleteOAuthSessionsByProvider(provider string) int

func GetOAuthSession

func GetOAuthSession(state string) (provider string, status string, ok bool)

func IsOAuthSessionPending

func IsOAuthSessionPending(state, provider string) bool

func NormalizeOAuthProvider

func NormalizeOAuthProvider(provider string) (string, error)

func RegisterOAuthSession

func RegisterOAuthSession(state, provider string)

func SetOAuthSessionError

func SetOAuthSessionError(state, message string)

func ValidateOAuthState

func ValidateOAuthState(state string) error

func WriteConfig

func WriteConfig(path string, data []byte) error

func WriteOAuthCallbackFile

func WriteOAuthCallbackFile(authDir, provider, state, code, errorMessage string) (string, error)

func WriteOAuthCallbackFileForPendingSession

func WriteOAuthCallbackFileForPendingSession(authDir, provider, state, code, errorMessage string) (string, error)

Types

type CacheMetricsResponse

type CacheMetricsResponse struct {
	Enabled bool                   `json:"enabled"`
	Metrics map[string]interface{} `json:"metrics,omitempty"`
	Error   string                 `json:"error,omitempty"`
}

CacheMetricsResponse represents the cache metrics API response.

type DashboardResponse

type DashboardResponse struct {
	Timestamp string      `json:"timestamp"`
	System    SystemStats `json:"system"`
	Server    ServerStats `json:"server"`
}

DashboardResponse is the JSON structure returned by the observability dashboard endpoint.

type DiscoverModelsRequest

type DiscoverModelsRequest struct {
	ModelsURL string            `json:"modelsUrl"`
	APIKey    string            `json:"apiKey"`
	BaseURL   string            `json:"baseUrl"`
	ProxyURL  string            `json:"proxyUrl"`
	Headers   map[string]string `json:"headers"`
}

type FeedbackHandler

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

FeedbackHandler handles the /v0/management/feedback endpoint. It requires an intelligence service to be provided.

func NewFeedbackHandler

func NewFeedbackHandler(intelligenceService *intelligence.Service) *FeedbackHandler

NewFeedbackHandler creates a new feedback handler.

Parameters:

  • intelligenceService: The intelligence service instance

Returns:

  • *FeedbackHandler: A new handler instance

func (*FeedbackHandler) GetFeedbackStats

func (h *FeedbackHandler) GetFeedbackStats(c *gin.Context)

GetFeedbackStats handles GET /v0/management/feedback/stats Returns aggregated statistics about feedback records.

Response:

  • 200: Success with statistics
  • 503: Intelligence services not enabled

func (*FeedbackHandler) GetRecentFeedback

func (h *FeedbackHandler) GetRecentFeedback(c *gin.Context)

GetRecentFeedback handles GET /v0/management/feedback/recent Returns the most recent feedback records.

Query Parameters:

  • limit: Maximum number of records to return (default: 100)

Response:

  • 200: Success with feedback records
  • 503: Intelligence services not enabled

func (*FeedbackHandler) SubmitFeedback

func (h *FeedbackHandler) SubmitFeedback(c *gin.Context)

SubmitFeedback handles POST /v0/management/feedback Accepts explicit feedback submission from clients.

Request Body:

  • FeedbackRequest: The feedback data

Response:

  • 201: Feedback recorded successfully
  • 400: Invalid request body
  • 503: Intelligence services not enabled

type FeedbackRequest

type FeedbackRequest struct {
	Query           string                 `json:"query" binding:"required"`
	Intent          string                 `json:"intent" binding:"required"`
	SelectedModel   string                 `json:"selected_model" binding:"required"`
	RoutingTier     string                 `json:"routing_tier" binding:"required"`
	Confidence      float64                `json:"confidence"`
	MatchedSkill    string                 `json:"matched_skill,omitempty"`
	CascadeOccurred bool                   `json:"cascade_occurred"`
	ResponseQuality float64                `json:"response_quality,omitempty"`
	LatencyMs       int64                  `json:"latency_ms" binding:"required"`
	Success         bool                   `json:"success"`
	ErrorMessage    string                 `json:"error_message,omitempty"`
	Metadata        map[string]interface{} `json:"metadata,omitempty"`
}

FeedbackRequest represents a request to submit feedback.

type FeedbackStatsResponse

type FeedbackStatsResponse struct {
	TotalRecords     int64            `json:"total_records"`
	SuccessRate      float64          `json:"success_rate"`
	TierDistribution map[string]int64 `json:"tier_distribution"`
	AvgLatencyMs     float64          `json:"avg_latency_ms"`
	CascadeRate      float64          `json:"cascade_rate"`
}

FeedbackStatsResponse represents aggregated feedback statistics.

type Handler

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

Handler aggregates config reference, persistence path and helpers.

func NewHandler

func NewHandler(cfg *config.Config, configFilePath string, manager *coreauth.Manager) *Handler

NewHandler creates a new management handler instance.

func (*Handler) DeleteAPIKeys

func (h *Handler) DeleteAPIKeys(c *gin.Context)

func (*Handler) DeleteAmpModelMappings

func (h *Handler) DeleteAmpModelMappings(c *gin.Context)

DeleteAmpModelMappings removes specified model mappings by "from" field.

func (*Handler) DeleteAmpUpstreamAPIKey

func (h *Handler) DeleteAmpUpstreamAPIKey(c *gin.Context)

DeleteAmpUpstreamAPIKey clears the ampcode upstream API key.

func (*Handler) DeleteAmpUpstreamURL

func (h *Handler) DeleteAmpUpstreamURL(c *gin.Context)

DeleteAmpUpstreamURL clears the ampcode upstream URL.

func (*Handler) DeleteAuthFile

func (h *Handler) DeleteAuthFile(c *gin.Context)

Delete auth files: single by name or all

func (*Handler) DeleteClaudeKey

func (h *Handler) DeleteClaudeKey(c *gin.Context)

func (*Handler) DeleteCodexKey

func (h *Handler) DeleteCodexKey(c *gin.Context)

func (*Handler) DeleteGeminiKey

func (h *Handler) DeleteGeminiKey(c *gin.Context)

func (*Handler) DeleteLogs

func (h *Handler) DeleteLogs(c *gin.Context)

DeleteLogs removes all rotated log files and truncates the active log.

func (*Handler) DeleteOAuthExcludedModels

func (h *Handler) DeleteOAuthExcludedModels(c *gin.Context)

func (*Handler) DeleteOpenAICompat

func (h *Handler) DeleteOpenAICompat(c *gin.Context)

func (*Handler) DeleteProxyURL

func (h *Handler) DeleteProxyURL(c *gin.Context)

func (*Handler) DeleteSwitchAIKey

func (h *Handler) DeleteSwitchAIKey(c *gin.Context)

func (*Handler) DiscoverModels

func (h *Handler) DiscoverModels(c *gin.Context)

func (*Handler) DownloadAuthFile

func (h *Handler) DownloadAuthFile(c *gin.Context)

Download single auth file by name

func (*Handler) DownloadRequestErrorLog

func (h *Handler) DownloadRequestErrorLog(c *gin.Context)

DownloadRequestErrorLog downloads a specific error request log file by name.

func (*Handler) GetAPIKeys

func (h *Handler) GetAPIKeys(c *gin.Context)

api-keys

func (*Handler) GetAmpCode

func (h *Handler) GetAmpCode(c *gin.Context)

GetAmpCode returns the complete ampcode configuration.

func (*Handler) GetAmpForceModelMappings

func (h *Handler) GetAmpForceModelMappings(c *gin.Context)

GetAmpForceModelMappings returns whether model mappings are forced.

func (*Handler) GetAmpModelMappings

func (h *Handler) GetAmpModelMappings(c *gin.Context)

GetAmpModelMappings returns the ampcode model mappings.

func (*Handler) GetAmpRestrictManagementToLocalhost

func (h *Handler) GetAmpRestrictManagementToLocalhost(c *gin.Context)

GetAmpRestrictManagementToLocalhost returns the localhost restriction setting.

func (*Handler) GetAmpUpstreamAPIKey

func (h *Handler) GetAmpUpstreamAPIKey(c *gin.Context)

GetAmpUpstreamAPIKey returns the ampcode upstream API key.

func (*Handler) GetAmpUpstreamURL

func (h *Handler) GetAmpUpstreamURL(c *gin.Context)

GetAmpUpstreamURL returns the ampcode upstream URL.

func (*Handler) GetAnalytics

func (h *Handler) GetAnalytics(c *gin.Context)

GetAnalytics returns computed analytics from the memory system. GET /v0/management/analytics

func (*Handler) GetAuthFileModels

func (h *Handler) GetAuthFileModels(c *gin.Context)

GetAuthFileModels returns the models supported by a specific auth file

func (*Handler) GetAuthStatus

func (h *Handler) GetAuthStatus(c *gin.Context)

func (*Handler) GetAutoRouteJournal

func (h *Handler) GetAutoRouteJournal(c *gin.Context)

GetAutoRouteJournal returns the latest routing decisions from the ring buffer.

func (*Handler) GetAutoRouteStatus

func (h *Handler) GetAutoRouteStatus(c *gin.Context)

GetAutoRouteStatus returns the active weights and metrics from the AutoRouting Lab.

func (*Handler) GetClaudeKeys

func (h *Handler) GetClaudeKeys(c *gin.Context)

claude-api-key: []ClaudeKey

func (*Handler) GetCodexKeys

func (h *Handler) GetCodexKeys(c *gin.Context)

codex-api-key: []CodexKey

func (*Handler) GetConfig

func (h *Handler) GetConfig(c *gin.Context)

func (*Handler) GetConfigYAML

func (h *Handler) GetConfigYAML(c *gin.Context)

GetConfigYAML returns the raw config.yaml file bytes without re-encoding. It preserves comments and original formatting/styles.

func (*Handler) GetDebug

func (h *Handler) GetDebug(c *gin.Context)

Debug

func (*Handler) GetGeminiKeys

func (h *Handler) GetGeminiKeys(c *gin.Context)

gemini-api-key: []GeminiKey

func (*Handler) GetHeartbeatStatus

func (h *Handler) GetHeartbeatStatus(c *gin.Context)

GetHeartbeatStatus returns the current status of all monitored providers. GET /v0/management/heartbeat/status

func (*Handler) GetHooksStatus

func (h *Handler) GetHooksStatus(c *gin.Context)

GetHooksStatus returns all loaded hooks and their configuration. GET /v0/management/hooks/status

func (*Handler) GetLatestVersion

func (h *Handler) GetLatestVersion(c *gin.Context)

GetLatestVersion returns the latest release version from GitHub without downloading assets.

func (*Handler) GetLoggingToFile

func (h *Handler) GetLoggingToFile(c *gin.Context)

UsageStatisticsEnabled

func (*Handler) GetLogs

func (h *Handler) GetLogs(c *gin.Context)

GetLogs returns log lines with optional incremental loading.

func (*Handler) GetMaxRetryInterval

func (h *Handler) GetMaxRetryInterval(c *gin.Context)

Max retry interval

func (*Handler) GetMemoryStats

func (h *Handler) GetMemoryStats(c *gin.Context)

GetMemoryStats returns statistics about the memory system. GET /v0/management/memory/stats

func (*Handler) GetOAuthExcludedModels

func (h *Handler) GetOAuthExcludedModels(c *gin.Context)

oauth-excluded-models: map[string][]string

func (*Handler) GetOpenAICompat

func (h *Handler) GetOpenAICompat(c *gin.Context)

openai-compatibility: []OpenAICompatibility

func (*Handler) GetProxyURL

func (h *Handler) GetProxyURL(c *gin.Context)

Proxy URL

func (*Handler) GetRequestErrorLogs

func (h *Handler) GetRequestErrorLogs(c *gin.Context)

GetRequestErrorLogs lists error request log files when RequestLog is disabled. It returns an empty list when RequestLog is enabled.

func (*Handler) GetRequestLog

func (h *Handler) GetRequestLog(c *gin.Context)

Request log

func (*Handler) GetRequestLogByID

func (h *Handler) GetRequestLogByID(c *gin.Context)

GetRequestLogByID finds and downloads a request log file by its request ID. The ID is matched against the suffix of log file names (format: *-{requestID}.log).

func (*Handler) GetRequestRetry

func (h *Handler) GetRequestRetry(c *gin.Context)

Request retry

func (*Handler) GetSetupStatus

func (h *Handler) GetSetupStatus(c *gin.Context)

GetSetupStatus returns whether a management password is currently configured.

func (*Handler) GetSteeringRules

func (h *Handler) GetSteeringRules(c *gin.Context)

GetSteeringRules returns all loaded steering rules. GET /v0/management/steering/rules

func (*Handler) GetSuperbrainMetrics

func (h *Handler) GetSuperbrainMetrics(c *gin.Context)

GetSuperbrainMetrics returns the current Superbrain metrics snapshot. This endpoint exposes observability data for monitoring autonomous healing operations.

Response includes: - Healing attempts, successes, and failures - Breakdown by healing type and failure type - Latency statistics - Active monitoring contexts and queued actions - Success/failure rates

func (*Handler) GetSwitchAIKeys

func (h *Handler) GetSwitchAIKeys(c *gin.Context)

switchai-api-key: []SwitchAIKey

func (*Handler) GetSwitchPreviewModel

func (h *Handler) GetSwitchPreviewModel(c *gin.Context)

func (*Handler) GetSwitchProject

func (h *Handler) GetSwitchProject(c *gin.Context)

Quota exceeded toggles

func (*Handler) GetUsageStatistics

func (h *Handler) GetUsageStatistics(c *gin.Context)

GetUsageStatistics returns the in-memory request statistics snapshot.

func (*Handler) GetUsageStatisticsEnabled

func (h *Handler) GetUsageStatisticsEnabled(c *gin.Context)

UsageStatisticsEnabled

func (*Handler) GetWebsocketAuth

func (h *Handler) GetWebsocketAuth(c *gin.Context)

Websocket auth

func (*Handler) HandleCacheClear

func (h *Handler) HandleCacheClear(w http.ResponseWriter, r *http.Request)

HandleCacheClear clears all entries from the semantic cache. POST /v0/management/cache/clear

func (*Handler) HandleCacheMetrics

func (h *Handler) HandleCacheMetrics(w http.ResponseWriter, r *http.Request)

HandleCacheMetrics returns cache performance metrics. GET /v0/management/cache/metrics

func (*Handler) HandleDashboard

func (h *Handler) HandleDashboard(c *gin.Context)

HandleDashboard returns a Gin handler that serves the observability dashboard JSON. This endpoint aggregates runtime metrics without introducing new data collection — it reads from existing Go runtime stats and the Prometheus collectors already registered.

The dashboard is designed for consumption by monitoring UIs and health check scripts.

func (*Handler) ImportVertexCredential

func (h *Handler) ImportVertexCredential(c *gin.Context)

ImportVertexCredential handles uploading a Vertex service account JSON and saving it as an auth record.

func (*Handler) InitializeSecret

func (h *Handler) InitializeSecret(c *gin.Context)

InitializeSecret allows setting the initial management password if none is configured.

func (*Handler) ListAuthFiles

func (h *Handler) ListAuthFiles(c *gin.Context)

func (*Handler) Middleware

func (h *Handler) Middleware() gin.HandlerFunc

Middleware enforces access control for management endpoints. All requests (local and remote) require a valid management key. Additionally, remote access requires allow-remote-management=true.

func (*Handler) PatchAPIKeys

func (h *Handler) PatchAPIKeys(c *gin.Context)

func (*Handler) PatchAmpModelMappings

func (h *Handler) PatchAmpModelMappings(c *gin.Context)

PatchAmpModelMappings adds or updates model mappings.

func (*Handler) PatchClaudeKey

func (h *Handler) PatchClaudeKey(c *gin.Context)

func (*Handler) PatchCodexKey

func (h *Handler) PatchCodexKey(c *gin.Context)

func (*Handler) PatchGeminiKey

func (h *Handler) PatchGeminiKey(c *gin.Context)

func (*Handler) PatchOAuthExcludedModels

func (h *Handler) PatchOAuthExcludedModels(c *gin.Context)

func (*Handler) PatchOpenAICompat

func (h *Handler) PatchOpenAICompat(c *gin.Context)

func (*Handler) PatchSwitchAIKey

func (h *Handler) PatchSwitchAIKey(c *gin.Context)

func (*Handler) PostOAuthCallback

func (h *Handler) PostOAuthCallback(c *gin.Context)

func (*Handler) PutAPIKeys

func (h *Handler) PutAPIKeys(c *gin.Context)

func (*Handler) PutAmpForceModelMappings

func (h *Handler) PutAmpForceModelMappings(c *gin.Context)

PutAmpForceModelMappings updates the force model mappings setting.

func (*Handler) PutAmpModelMappings

func (h *Handler) PutAmpModelMappings(c *gin.Context)

PutAmpModelMappings replaces all ampcode model mappings.

func (*Handler) PutAmpRestrictManagementToLocalhost

func (h *Handler) PutAmpRestrictManagementToLocalhost(c *gin.Context)

PutAmpRestrictManagementToLocalhost updates the localhost restriction setting.

func (*Handler) PutAmpUpstreamAPIKey

func (h *Handler) PutAmpUpstreamAPIKey(c *gin.Context)

PutAmpUpstreamAPIKey updates the ampcode upstream API key.

func (*Handler) PutAmpUpstreamURL

func (h *Handler) PutAmpUpstreamURL(c *gin.Context)

PutAmpUpstreamURL updates the ampcode upstream URL.

func (*Handler) PutClaudeKeys

func (h *Handler) PutClaudeKeys(c *gin.Context)

func (*Handler) PutCodexKeys

func (h *Handler) PutCodexKeys(c *gin.Context)

func (*Handler) PutConfigYAML

func (h *Handler) PutConfigYAML(c *gin.Context)

func (*Handler) PutDebug

func (h *Handler) PutDebug(c *gin.Context)

func (*Handler) PutGeminiKeys

func (h *Handler) PutGeminiKeys(c *gin.Context)

func (*Handler) PutLoggingToFile

func (h *Handler) PutLoggingToFile(c *gin.Context)

func (*Handler) PutMaxRetryInterval

func (h *Handler) PutMaxRetryInterval(c *gin.Context)

func (*Handler) PutOAuthExcludedModels

func (h *Handler) PutOAuthExcludedModels(c *gin.Context)

func (*Handler) PutOpenAICompat

func (h *Handler) PutOpenAICompat(c *gin.Context)

func (*Handler) PutProxyURL

func (h *Handler) PutProxyURL(c *gin.Context)

func (*Handler) PutRequestLog

func (h *Handler) PutRequestLog(c *gin.Context)

func (*Handler) PutRequestRetry

func (h *Handler) PutRequestRetry(c *gin.Context)

func (*Handler) PutSwitchAIKeys

func (h *Handler) PutSwitchAIKeys(c *gin.Context)

func (*Handler) PutSwitchPreviewModel

func (h *Handler) PutSwitchPreviewModel(c *gin.Context)

func (*Handler) PutSwitchProject

func (h *Handler) PutSwitchProject(c *gin.Context)

func (*Handler) PutUsageStatisticsEnabled

func (h *Handler) PutUsageStatisticsEnabled(c *gin.Context)

func (*Handler) PutWebsocketAuth

func (h *Handler) PutWebsocketAuth(c *gin.Context)

func (*Handler) ReloadHooks

func (h *Handler) ReloadHooks(c *gin.Context)

ReloadHooks reloads hooks from disk without restarting the server. POST /v0/management/hooks/reload

func (*Handler) ReloadSteering

func (h *Handler) ReloadSteering(c *gin.Context)

ReloadSteering reloads steering rules from disk without restarting the server. POST /v0/management/steering/reload

func (*Handler) RequestAnthropicToken

func (h *Handler) RequestAnthropicToken(c *gin.Context)

func (*Handler) RequestAntigravityToken

func (h *Handler) RequestAntigravityToken(c *gin.Context)

func (*Handler) RequestCodexToken

func (h *Handler) RequestCodexToken(c *gin.Context)

func (*Handler) RequestGeminiCLIToken

func (h *Handler) RequestGeminiCLIToken(c *gin.Context)

func (*Handler) RequestIFlowCookieToken

func (h *Handler) RequestIFlowCookieToken(c *gin.Context)

func (*Handler) RequestIFlowToken

func (h *Handler) RequestIFlowToken(c *gin.Context)

func (*Handler) RequestQwenToken

func (h *Handler) RequestQwenToken(c *gin.Context)

func (*Handler) ResetSecret

func (h *Handler) ResetSecret(c *gin.Context)

func (*Handler) SetAuthManager

func (h *Handler) SetAuthManager(manager *coreauth.Manager)

SetAuthManager updates the auth manager reference used by management endpoints.

func (*Handler) SetAutoResolver

func (h *Handler) SetAutoResolver(ar *autoroute.AutoResolver)

SetAutoResolver sets the auto-routing telemetry bridge for the dashboard.

func (*Handler) SetConfig

func (h *Handler) SetConfig(cfg *config.Config)

SetConfig updates the in-memory config reference when the server hot-reloads.

func (*Handler) SetIntelligenceService

func (h *Handler) SetIntelligenceService(svc IntelligenceService)

SetIntelligenceService updates the intelligence service reference.

func (*Handler) SetLocalPassword

func (h *Handler) SetLocalPassword(password string)

SetLocalPassword configures the runtime-local password accepted for localhost requests.

func (*Handler) SetLogDirectory

func (h *Handler) SetLogDirectory(dir string)

SetLogDirectory updates the directory where main.log should be looked up.

func (*Handler) SetServiceCoordinator

func (h *Handler) SetServiceCoordinator(coordinator ServiceCoordinatorInterface)

SetServiceCoordinator updates the service coordinator reference.

func (*Handler) SetUsageStatistics

func (h *Handler) SetUsageStatistics(stats *usage.RequestStatistics)

SetUsageStatistics allows replacing the usage statistics reference.

func (*Handler) SkipSecret

func (h *Handler) SkipSecret(c *gin.Context)

func (*Handler) TestProvider

func (h *Handler) TestProvider(c *gin.Context)

TestProvider attempts to verify if a provider is correctly configured and reachable.

func (*Handler) UploadAuthFile

func (h *Handler) UploadAuthFile(c *gin.Context)

Upload auth file: multipart or raw JSON with ?name=

type IntelligenceService

type IntelligenceService interface {
	IsEnabled() bool
	GetSemanticCache() intelligence.SemanticCacheInterface
}

IntelligenceService defines the interface for accessing intelligence features.

type ModelInfo

type ModelInfo struct {
	ID            string `json:"id"`
	Name          string `json:"name,omitempty"`
	ContextWindow int    `json:"contextWindow,omitempty"`
}

type ServerStats

type ServerStats struct {
	Uptime string `json:"uptime"`
}

ServerStats reports proxy server metadata.

type ServiceCoordinatorInterface

type ServiceCoordinatorInterface interface {
	GetMemory() interface{}
	GetHeartbeat() interface{}
	GetSteering() interface{}
	GetHooks() interface{}
}

ServiceCoordinatorInterface defines the interface for accessing the service coordinator.

type SkillMetadata

type SkillMetadata struct {
	// ID is the unique identifier for the skill
	ID string `json:"id"`

	// Name is the human-readable name
	Name string `json:"name"`

	// Description explains what the skill does
	Description string `json:"description"`

	// RequiredCapability specifies which capability slot this skill needs
	RequiredCapability string `json:"required_capability"`

	// HasEmbedding indicates whether an embedding has been computed for this skill
	HasEmbedding bool `json:"has_embedding"`
}

SkillMetadata represents metadata for a single skill.

type SkillsHandler

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

SkillsHandler handles the /v0/management/skills endpoint. It requires an intelligence service to be provided.

func NewSkillsHandler

func NewSkillsHandler(intelligenceService *intelligence.Service) *SkillsHandler

NewSkillsHandler creates a new skills handler.

Parameters:

  • intelligenceService: The intelligence service instance

Returns:

  • *SkillsHandler: A new handler instance

func (*SkillsHandler) GetSkills

func (h *SkillsHandler) GetSkills(c *gin.Context)

GetSkills handles GET /v0/management/skills Returns skill count, metadata, and usage statistics.

Response:

  • 200: Success with skill metadata
  • 503: Intelligence services not enabled

type SkillsResponse

type SkillsResponse struct {
	// Count is the total number of loaded skills
	Count int `json:"count"`

	// Skills contains metadata for all loaded skills
	Skills []SkillMetadata `json:"skills"`

	// EmbeddingsAvailable indicates whether embeddings have been computed
	EmbeddingsAvailable bool `json:"embeddings_available"`

	// UsageStats contains usage statistics for each skill
	UsageStats map[string]int64 `json:"usage_stats,omitempty"`
}

SkillsResponse represents the response for the skills endpoint.

type SystemStats

type SystemStats struct {
	Goroutines  int     `json:"goroutines"`
	HeapAllocMB float64 `json:"heap_alloc_mb"`
	HeapSysMB   float64 `json:"heap_sys_mb"`
	NumGC       uint32  `json:"num_gc"`
	GoVersion   string  `json:"go_version"`
	NumCPU      int     `json:"num_cpu"`
}

SystemStats reports Go runtime metrics.

type TestProviderRequest

type TestProviderRequest struct {
	ProviderID string                 `json:"provider_id"`
	Category   string                 `json:"category"`
	Config     map[string]interface{} `json:"config"`
}

TestProviderRequest defines the payload for testing a provider configuration.

Jump to

Keyboard shortcuts

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