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
DefaultChain string
HITLPolicyName string
}
CLIConfigPatch selects which CLI default keys to write; empty strings mean "do not change".
type CLIConfigSnapshot ¶
type CLIConfigSnapshot struct {
DefaultModel string
DefaultProvider string
DefaultAltModel string
DefaultAltProvider 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)
// SetCLIConfig updates CLI default keys (model, provider, chain, hitl-policy-name) in SQLite KV (same as contenox config set / PUT /cli-config).
// Empty fields in the patch are left unchanged. At least one field must be non-empty after trim.
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.