Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CLIConfigPatch ¶
type CLIConfigPatch struct {
DefaultModel *string
DefaultProvider *string
DefaultAltModel *string
DefaultAltProvider *string
DefaultAutocompleteModel *string
DefaultAutocompleteProvider *string
DefaultMaxTokens *string
DefaultChain *string
HITLPolicyName *string
}
CLIConfigPatch selects which CLI default keys to write; nil means "do not change".
type CLIConfigSnapshot ¶
type CLIConfigSnapshot struct {
DefaultModel string
DefaultProvider string
DefaultAltModel string
DefaultAltProvider string
DefaultAutocompleteModel string
DefaultAutocompleteProvider string
DefaultMaxTokens string
DefaultChain string
HITLPolicyName string
ResolvedFrom map[string]string
}
CLIConfigSnapshot is the resolved KV values after an update.
type Service ¶
type Service interface {
Get(ctx context.Context) ([]statetype.BackendRuntimeState, error)
// SetupStatus returns readiness from KV defaults, registered backends, and current runtime state.
SetupStatus(ctx context.Context) (setupcheck.Result, error)
// Refresh reconciles registered backends/models, then returns the updated setup status.
Refresh(ctx context.Context) (setupcheck.Result, error)
// SetCLIConfig updates CLI default keys in SQLite KV (same as contenox config set / PUT /cli-config).
// Nil fields in the patch are left unchanged. Empty string fields are written and can clear a resolved setting.
SetCLIConfig(ctx context.Context, patch CLIConfigPatch) (CLIConfigSnapshot, error)
}
Service exposes runtime backend state plus onboarding/setup evaluation (same inputs as GET /setup-status).
func New ¶
New returns a state service backed by runtime state and the same DB used for backends + CLI KV. workspaceID scopes workspace-specific config (default-chain, hitl-policy-name) with global fallback.
func WithActivityTracker ¶
func WithActivityTracker(service Service, tracker libtracker.ActivityTracker) Service
WithActivityTracker wraps a StateService with activity tracking
Click to show internal directories.
Click to hide internal directories.