Documentation
¶
Overview ¶
Package settings owns the single-row system_settings table: the tenant-wide default (provider FK, bare model name) pairs the agent-create flow prefills from. Read is open to any authenticated user (the agent-create form needs it); write is admin-only. Both gates run through authz.Authorize.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ModelCatalog ¶
type ModelCatalog interface {
ListModels(ctx context.Context, p authz.Principal, opts catalog.ListModelsOptions) ([]catalog.Model, error)
}
ModelCatalog is the slice of the catalog service settings needs to verify, server-side, that a chosen default model actually has the capability its slot requires (defense-in-depth behind the UI's capability-filtered pickers). *catalog.Service satisfies it.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
type SlotUpdate ¶
type SlotUpdate struct {
Name string // logical key: "default_build", "default_exec", …
Model string
ProviderIDRaw string
ModelRequired bool // when false, an empty model paired with an FK is allowed (e.g. default_search)
}
SlotUpdate is one (provider FK, bare model name) pair the operator is editing for a single capability. The raw FK string is parsed inside Update so the handler doesn't need to know which empty/uuid rules apply per capability.
type UpdateRequest ¶
type UpdateRequest struct {
Slots []SlotUpdate
}
UpdateRequest carries every capability slot. The handler builds it from the inbound proto; the service does the empty/FK validation + per-slot model-required rule.