Documentation
¶
Index ¶
- Constants
- Variables
- func EncodeEngineProfileYAMLSingleRegistry(registry *EngineProfileRegistry) ([]byte, error)
- func EncodeYAMLRegistries(registries []*EngineProfileRegistry) ([]byte, error)
- func MergeInferenceSettings(base *aistepssettings.InferenceSettings, ...) (*aistepssettings.InferenceSettings, error)
- func ParseEngineProfileRegistrySourceEntries(raw string) ([]string, error)
- func SQLiteProfileDSNForFile(path string) (string, error)
- func TouchEngineProfileMetadata(meta *EngineProfileMetadata, opts SaveOptions, now int64)
- func TouchRegistryMetadata(meta *RegistryMetadata, opts SaveOptions, now int64)
- func ValidateEngineProfile(profile *EngineProfile) error
- func ValidateEngineProfileRef(ref EngineProfileRef, fieldPrefix string) error
- func ValidateEngineProfileSlug(slug EngineProfileSlug) error
- func ValidateProfileExtensions(extensions map[string]any) error
- func ValidateProfileStackTopology(registries []*EngineProfileRegistry, opts StackValidationOptions) error
- func ValidateRegistry(registry *EngineProfileRegistry) error
- func ValidateRegistrySlug(slug RegistrySlug) error
- type ChainedRegistry
- func (c *ChainedRegistry) Close() error
- func (c *ChainedRegistry) DefaultRegistrySlug() RegistrySlug
- func (c *ChainedRegistry) GetEngineProfile(ctx context.Context, registrySlug RegistrySlug, profileSlug EngineProfileSlug) (*EngineProfile, error)
- func (c *ChainedRegistry) GetRegistry(ctx context.Context, registrySlug RegistrySlug) (*EngineProfileRegistry, error)
- func (c *ChainedRegistry) ListEngineProfiles(ctx context.Context, registrySlug RegistrySlug) ([]*EngineProfile, error)
- func (c *ChainedRegistry) ListRegistries(ctx context.Context) ([]RegistrySummary, error)
- func (c *ChainedRegistry) ResolveEngineProfile(ctx context.Context, in ResolveInput) (*ResolvedEngineProfile, error)
- type EngineProfile
- type EngineProfileMetadata
- type EngineProfileRef
- type EngineProfileRegistry
- type EngineProfileSlug
- func (s EngineProfileSlug) IsZero() bool
- func (s EngineProfileSlug) MarshalJSON() ([]byte, error)
- func (s EngineProfileSlug) MarshalText() ([]byte, error)
- func (s EngineProfileSlug) MarshalYAML() (interface{}, error)
- func (s EngineProfileSlug) String() string
- func (s *EngineProfileSlug) UnmarshalJSON(data []byte) error
- func (s *EngineProfileSlug) UnmarshalText(text []byte) error
- func (s *EngineProfileSlug) UnmarshalYAML(value *yaml.Node) error
- type EngineProfileStackLayer
- type EngineProfileStore
- type EngineProfileStoreReader
- type EngineProfileStoreWriter
- type ExtensionCodec
- type ExtensionCodecMetadataProvider
- type ExtensionCodecRegistry
- type ExtensionKey
- type ExtensionSchemaCodec
- type InMemoryEngineProfileStore
- func (s *InMemoryEngineProfileStore) Close() error
- func (s *InMemoryEngineProfileStore) DeleteRegistry(_ context.Context, registrySlug RegistrySlug, opts SaveOptions) error
- func (s *InMemoryEngineProfileStore) GetEngineProfile(ctx context.Context, registrySlug RegistrySlug, profileSlug EngineProfileSlug) (*EngineProfile, bool, error)
- func (s *InMemoryEngineProfileStore) GetRegistry(_ context.Context, registrySlug RegistrySlug) (*EngineProfileRegistry, bool, error)
- func (s *InMemoryEngineProfileStore) ListEngineProfiles(ctx context.Context, registrySlug RegistrySlug) ([]*EngineProfile, error)
- func (s *InMemoryEngineProfileStore) ListRegistries(_ context.Context) ([]*EngineProfileRegistry, error)
- func (s *InMemoryEngineProfileStore) UpsertEngineProfile(_ context.Context, registrySlug RegistrySlug, profile *EngineProfile, ...) error
- func (s *InMemoryEngineProfileStore) UpsertRegistry(_ context.Context, registry *EngineProfileRegistry, opts SaveOptions) error
- type InMemoryExtensionCodecRegistry
- type ProfileExtensionKey
- func (k ProfileExtensionKey[T]) Decode(raw any) (T, error)
- func (k ProfileExtensionKey[T]) Delete(profile *EngineProfile)
- func (k ProfileExtensionKey[T]) Get(profile *EngineProfile) (T, bool, error)
- func (k ProfileExtensionKey[T]) ID() ExtensionKey
- func (k ProfileExtensionKey[T]) Set(profile *EngineProfile, value T) error
- func (k ProfileExtensionKey[T]) String() string
- type Registry
- type RegistryMetadata
- type RegistryReader
- type RegistrySlug
- func (s RegistrySlug) IsZero() bool
- func (s RegistrySlug) MarshalJSON() ([]byte, error)
- func (s RegistrySlug) MarshalText() ([]byte, error)
- func (s RegistrySlug) MarshalYAML() (interface{}, error)
- func (s RegistrySlug) String() string
- func (s *RegistrySlug) UnmarshalJSON(data []byte) error
- func (s *RegistrySlug) UnmarshalText(text []byte) error
- func (s *RegistrySlug) UnmarshalYAML(value *yaml.Node) error
- type RegistrySourceKind
- type RegistrySourceSpec
- type RegistrySummary
- type ResolveInput
- type ResolvedEngineProfile
- type ResolvedProfileStackEntry
- type SQLiteEngineProfileStore
- func (s *SQLiteEngineProfileStore) Close() error
- func (s *SQLiteEngineProfileStore) DeleteRegistry(ctx context.Context, registrySlug RegistrySlug, opts SaveOptions) error
- func (s *SQLiteEngineProfileStore) GetEngineProfile(ctx context.Context, registrySlug RegistrySlug, profileSlug EngineProfileSlug) (*EngineProfile, bool, error)
- func (s *SQLiteEngineProfileStore) GetRegistry(ctx context.Context, registrySlug RegistrySlug) (*EngineProfileRegistry, bool, error)
- func (s *SQLiteEngineProfileStore) ListEngineProfiles(ctx context.Context, registrySlug RegistrySlug) ([]*EngineProfile, error)
- func (s *SQLiteEngineProfileStore) ListRegistries(ctx context.Context) ([]*EngineProfileRegistry, error)
- func (s *SQLiteEngineProfileStore) UpsertEngineProfile(ctx context.Context, registrySlug RegistrySlug, profile *EngineProfile, ...) error
- func (s *SQLiteEngineProfileStore) UpsertRegistry(ctx context.Context, registry *EngineProfileRegistry, opts SaveOptions) error
- type SaveOptions
- type StackMergeResult
- type StackResolverOptions
- type StackValidationOptions
- type StoreRegistry
- func (r *StoreRegistry) ExpandEngineProfileStack(ctx context.Context, registrySlug RegistrySlug, profileSlug EngineProfileSlug, ...) ([]EngineProfileStackLayer, error)
- func (r *StoreRegistry) GetEngineProfile(ctx context.Context, registrySlug RegistrySlug, profileSlug EngineProfileSlug) (*EngineProfile, error)
- func (r *StoreRegistry) GetRegistry(ctx context.Context, registrySlug RegistrySlug) (*EngineProfileRegistry, error)
- func (r *StoreRegistry) ListEngineProfiles(ctx context.Context, registrySlug RegistrySlug) ([]*EngineProfile, error)
- func (r *StoreRegistry) ListRegistries(ctx context.Context) ([]RegistrySummary, error)
- func (r *StoreRegistry) ResolveEngineProfile(ctx context.Context, in ResolveInput) (*ResolvedEngineProfile, error)
- type StoreRegistryOption
- type ValidationError
- type VersionConflictError
- type YAMLFileEngineProfileStore
- func (s *YAMLFileEngineProfileStore) Close() error
- func (s *YAMLFileEngineProfileStore) DeleteRegistry(ctx context.Context, registrySlug RegistrySlug, opts SaveOptions) error
- func (s *YAMLFileEngineProfileStore) GetEngineProfile(ctx context.Context, registrySlug RegistrySlug, profileSlug EngineProfileSlug) (*EngineProfile, bool, error)
- func (s *YAMLFileEngineProfileStore) GetRegistry(ctx context.Context, registrySlug RegistrySlug) (*EngineProfileRegistry, bool, error)
- func (s *YAMLFileEngineProfileStore) ListEngineProfiles(ctx context.Context, registrySlug RegistrySlug) ([]*EngineProfile, error)
- func (s *YAMLFileEngineProfileStore) ListRegistries(ctx context.Context) ([]*EngineProfileRegistry, error)
- func (s *YAMLFileEngineProfileStore) UpsertEngineProfile(ctx context.Context, registrySlug RegistrySlug, profile *EngineProfile, ...) error
- func (s *YAMLFileEngineProfileStore) UpsertRegistry(ctx context.Context, registry *EngineProfileRegistry, opts SaveOptions) error
Constants ¶
const DefaultProfileStackValidationMaxDepth = 32
Variables ¶
Functions ¶
func EncodeEngineProfileYAMLSingleRegistry ¶
func EncodeEngineProfileYAMLSingleRegistry(registry *EngineProfileRegistry) ([]byte, error)
EncodeEngineProfileYAMLSingleRegistry encodes a single registry as engine profile YAML. Hard-cut behavior: default_profile_slug is omitted from the serialized document.
func EncodeYAMLRegistries ¶
func EncodeYAMLRegistries(registries []*EngineProfileRegistry) ([]byte, error)
EncodeYAMLRegistries encodes exactly one engine profile registry document. Hard-cut behavior: exactly one non-nil registry may be encoded.
func MergeInferenceSettings ¶
func MergeInferenceSettings(base *aistepssettings.InferenceSettings, overlay *aistepssettings.InferenceSettings) (*aistepssettings.InferenceSettings, error)
MergeInferenceSettings overlays engine profile inference settings onto a base settings object using the same merge semantics used for engine profile stack resolution. Overlay wins for conflicting scalar values while nested maps merge recursively.
func SQLiteProfileDSNForFile ¶
func TouchEngineProfileMetadata ¶
func TouchEngineProfileMetadata(meta *EngineProfileMetadata, opts SaveOptions, now int64)
TouchEngineProfileMetadata updates version/provenance fields for a profile mutation.
func TouchRegistryMetadata ¶
func TouchRegistryMetadata(meta *RegistryMetadata, opts SaveOptions, now int64)
TouchRegistryMetadata updates version/provenance fields for a registry mutation.
func ValidateEngineProfile ¶
func ValidateEngineProfile(profile *EngineProfile) error
func ValidateEngineProfileRef ¶
func ValidateEngineProfileRef(ref EngineProfileRef, fieldPrefix string) error
func ValidateEngineProfileSlug ¶
func ValidateEngineProfileSlug(slug EngineProfileSlug) error
func ValidateProfileStackTopology ¶
func ValidateProfileStackTopology(registries []*EngineProfileRegistry, opts StackValidationOptions) error
func ValidateRegistry ¶
func ValidateRegistry(registry *EngineProfileRegistry) error
func ValidateRegistrySlug ¶
func ValidateRegistrySlug(slug RegistrySlug) error
Types ¶
type ChainedRegistry ¶
type ChainedRegistry struct {
// contains filtered or unexported fields
}
ChainedRegistry routes reads over all loaded registries. It resolves profile slugs by stack precedence when no explicit registry is provided.
func NewChainedRegistryFromSourceSpecs ¶
func NewChainedRegistryFromSourceSpecs(ctx context.Context, specs []RegistrySourceSpec) (*ChainedRegistry, error)
func (*ChainedRegistry) Close ¶
func (c *ChainedRegistry) Close() error
func (*ChainedRegistry) DefaultRegistrySlug ¶
func (c *ChainedRegistry) DefaultRegistrySlug() RegistrySlug
func (*ChainedRegistry) GetEngineProfile ¶
func (c *ChainedRegistry) GetEngineProfile(ctx context.Context, registrySlug RegistrySlug, profileSlug EngineProfileSlug) (*EngineProfile, error)
func (*ChainedRegistry) GetRegistry ¶
func (c *ChainedRegistry) GetRegistry(ctx context.Context, registrySlug RegistrySlug) (*EngineProfileRegistry, error)
func (*ChainedRegistry) ListEngineProfiles ¶
func (c *ChainedRegistry) ListEngineProfiles(ctx context.Context, registrySlug RegistrySlug) ([]*EngineProfile, error)
func (*ChainedRegistry) ListRegistries ¶
func (c *ChainedRegistry) ListRegistries(ctx context.Context) ([]RegistrySummary, error)
func (*ChainedRegistry) ResolveEngineProfile ¶
func (c *ChainedRegistry) ResolveEngineProfile(ctx context.Context, in ResolveInput) (*ResolvedEngineProfile, error)
type EngineProfile ¶
type EngineProfile struct {
Slug EngineProfileSlug `json:"slug" yaml:"slug"`
DisplayName string `json:"display_name,omitempty" yaml:"display_name,omitempty"`
Description string `json:"description,omitempty" yaml:"description,omitempty"`
Stack []EngineProfileRef `json:"stack,omitempty" yaml:"stack,omitempty"`
InferenceSettings *aistepssettings.InferenceSettings `json:"inference_settings,omitempty" yaml:"inference_settings,omitempty"`
Metadata EngineProfileMetadata `json:"metadata,omitempty" yaml:"metadata,omitempty"`
Extensions map[string]any `json:"extensions,omitempty" yaml:"extensions,omitempty"`
}
EngineProfile is a named engine preset with inference settings and metadata.
func (*EngineProfile) Clone ¶
func (p *EngineProfile) Clone() *EngineProfile
type EngineProfileMetadata ¶
type EngineProfileMetadata struct {
Source string `json:"source,omitempty" yaml:"source,omitempty"`
Version uint64 `json:"version,omitempty" yaml:"version,omitempty"`
CreatedAtMs int64 `json:"created_at_ms,omitempty" yaml:"created_at_ms,omitempty"`
UpdatedAtMs int64 `json:"updated_at_ms,omitempty" yaml:"updated_at_ms,omitempty"`
CreatedBy string `json:"created_by,omitempty" yaml:"created_by,omitempty"`
UpdatedBy string `json:"updated_by,omitempty" yaml:"updated_by,omitempty"`
Tags []string `json:"tags,omitempty" yaml:"tags,omitempty"`
}
EngineProfileMetadata stores provenance and version fields.
type EngineProfileRef ¶
type EngineProfileRef struct {
RegistrySlug RegistrySlug `json:"registry_slug,omitempty" yaml:"registry_slug,omitempty"`
EngineProfileSlug EngineProfileSlug `json:"profile_slug" yaml:"profile_slug"`
}
EngineProfileRef identifies a profile that can be layered via stack composition. Empty RegistrySlug means "same registry as the referencing profile".
type EngineProfileRegistry ¶
type EngineProfileRegistry struct {
Slug RegistrySlug `json:"slug" yaml:"slug"`
DisplayName string `json:"display_name,omitempty" yaml:"display_name,omitempty"`
Description string `json:"description,omitempty" yaml:"description,omitempty"`
DefaultEngineProfileSlug EngineProfileSlug `json:"default_profile_slug,omitempty" yaml:"default_profile_slug,omitempty"`
Profiles map[EngineProfileSlug]*EngineProfile `json:"profiles,omitempty" yaml:"profiles,omitempty"`
Metadata RegistryMetadata `json:"metadata,omitempty" yaml:"metadata,omitempty"`
}
EngineProfileRegistry is a set of profiles with a default profile selector.
func DecodeEngineProfileYAMLSingleRegistry ¶
func DecodeEngineProfileYAMLSingleRegistry(data []byte) (*EngineProfileRegistry, error)
DecodeEngineProfileYAMLSingleRegistry decodes the engine profile YAML source format. Engine profile YAML is hard-cut to one-file-one-registry and rejects both bundle and legacy formats.
func DecodeYAMLRegistries ¶
func DecodeYAMLRegistries(data []byte, _ RegistrySlug) ([]*EngineProfileRegistry, error)
DecodeYAMLRegistries decodes a one-file-one-registry engine profile YAML document.
func (*EngineProfileRegistry) Clone ¶
func (r *EngineProfileRegistry) Clone() *EngineProfileRegistry
type EngineProfileSlug ¶
type EngineProfileSlug string
func MustEngineProfileSlug ¶
func MustEngineProfileSlug(raw string) EngineProfileSlug
func ParseEngineProfileSlug ¶
func ParseEngineProfileSlug(raw string) (EngineProfileSlug, error)
func (EngineProfileSlug) IsZero ¶
func (s EngineProfileSlug) IsZero() bool
func (EngineProfileSlug) MarshalJSON ¶
func (s EngineProfileSlug) MarshalJSON() ([]byte, error)
func (EngineProfileSlug) MarshalText ¶
func (s EngineProfileSlug) MarshalText() ([]byte, error)
func (EngineProfileSlug) MarshalYAML ¶
func (s EngineProfileSlug) MarshalYAML() (interface{}, error)
func (EngineProfileSlug) String ¶
func (s EngineProfileSlug) String() string
func (*EngineProfileSlug) UnmarshalJSON ¶
func (s *EngineProfileSlug) UnmarshalJSON(data []byte) error
func (*EngineProfileSlug) UnmarshalText ¶
func (s *EngineProfileSlug) UnmarshalText(text []byte) error
func (*EngineProfileSlug) UnmarshalYAML ¶
func (s *EngineProfileSlug) UnmarshalYAML(value *yaml.Node) error
type EngineProfileStackLayer ¶
type EngineProfileStackLayer struct {
RegistrySlug RegistrySlug
EngineProfileSlug EngineProfileSlug
EngineProfile *EngineProfile
}
type EngineProfileStore ¶
type EngineProfileStore interface {
EngineProfileStoreReader
EngineProfileStoreWriter
}
EngineProfileStore is the primary persistence abstraction used by profile registry services.
type EngineProfileStoreReader ¶
type EngineProfileStoreReader interface {
ListRegistries(ctx context.Context) ([]*EngineProfileRegistry, error)
GetRegistry(ctx context.Context, registrySlug RegistrySlug) (*EngineProfileRegistry, bool, error)
ListEngineProfiles(ctx context.Context, registrySlug RegistrySlug) ([]*EngineProfile, error)
GetEngineProfile(ctx context.Context, registrySlug RegistrySlug, profileSlug EngineProfileSlug) (*EngineProfile, bool, error)
}
EngineProfileStoreReader provides read operations over profile registries.
type EngineProfileStoreWriter ¶
type EngineProfileStoreWriter interface {
UpsertRegistry(ctx context.Context, registry *EngineProfileRegistry, opts SaveOptions) error
DeleteRegistry(ctx context.Context, registrySlug RegistrySlug, opts SaveOptions) error
UpsertEngineProfile(ctx context.Context, registrySlug RegistrySlug, profile *EngineProfile, opts SaveOptions) error
Close() error
}
EngineProfileStoreWriter provides write operations over profile registries.
type ExtensionCodec ¶
type ExtensionCodec interface {
Key() ExtensionKey
Decode(raw any) (any, error)
}
ExtensionCodec decodes and normalizes extension payloads for one extension key.
type ExtensionCodecMetadataProvider ¶
type ExtensionCodecMetadataProvider interface {
ExtensionDisplayName() string
ExtensionDescription() string
}
ExtensionCodecMetadataProvider optionally exposes display metadata for one extension codec.
type ExtensionCodecRegistry ¶
type ExtensionCodecRegistry interface {
ListCodecs() []ExtensionCodec
}
ExtensionCodecRegistry enumerates extension codecs in deterministic order.
type ExtensionKey ¶
type ExtensionKey string
ExtensionKey is a canonical profile-extension identifier in the form: namespace.feature@vN
func MustExtensionKey ¶
func MustExtensionKey(raw string) ExtensionKey
func NewExtensionKey ¶
func NewExtensionKey(namespace, feature string, version uint16) (ExtensionKey, error)
func ParseExtensionKey ¶
func ParseExtensionKey(raw string) (ExtensionKey, error)
func (ExtensionKey) IsZero ¶
func (k ExtensionKey) IsZero() bool
func (ExtensionKey) String ¶
func (k ExtensionKey) String() string
type ExtensionSchemaCodec ¶
type ExtensionSchemaCodec interface {
ExtensionCodec
JSONSchema() map[string]any
}
ExtensionSchemaCodec optionally exposes JSON schema metadata for one extension codec. This is used by API schema discovery endpoints.
type InMemoryEngineProfileStore ¶
type InMemoryEngineProfileStore struct {
// contains filtered or unexported fields
}
InMemoryEngineProfileStore is a thread-safe EngineProfileStore implementation.
func NewInMemoryEngineProfileStore ¶
func NewInMemoryEngineProfileStore() *InMemoryEngineProfileStore
func (*InMemoryEngineProfileStore) Close ¶
func (s *InMemoryEngineProfileStore) Close() error
func (*InMemoryEngineProfileStore) DeleteRegistry ¶
func (s *InMemoryEngineProfileStore) DeleteRegistry(_ context.Context, registrySlug RegistrySlug, opts SaveOptions) error
func (*InMemoryEngineProfileStore) GetEngineProfile ¶
func (s *InMemoryEngineProfileStore) GetEngineProfile(ctx context.Context, registrySlug RegistrySlug, profileSlug EngineProfileSlug) (*EngineProfile, bool, error)
func (*InMemoryEngineProfileStore) GetRegistry ¶
func (s *InMemoryEngineProfileStore) GetRegistry(_ context.Context, registrySlug RegistrySlug) (*EngineProfileRegistry, bool, error)
func (*InMemoryEngineProfileStore) ListEngineProfiles ¶
func (s *InMemoryEngineProfileStore) ListEngineProfiles(ctx context.Context, registrySlug RegistrySlug) ([]*EngineProfile, error)
func (*InMemoryEngineProfileStore) ListRegistries ¶
func (s *InMemoryEngineProfileStore) ListRegistries(_ context.Context) ([]*EngineProfileRegistry, error)
func (*InMemoryEngineProfileStore) UpsertEngineProfile ¶
func (s *InMemoryEngineProfileStore) UpsertEngineProfile(_ context.Context, registrySlug RegistrySlug, profile *EngineProfile, opts SaveOptions) error
func (*InMemoryEngineProfileStore) UpsertRegistry ¶
func (s *InMemoryEngineProfileStore) UpsertRegistry(_ context.Context, registry *EngineProfileRegistry, opts SaveOptions) error
type InMemoryExtensionCodecRegistry ¶
type InMemoryExtensionCodecRegistry struct {
// contains filtered or unexported fields
}
InMemoryExtensionCodecRegistry stores codecs in a map keyed by extension key.
func NewInMemoryExtensionCodecRegistry ¶
func NewInMemoryExtensionCodecRegistry(codecs ...ExtensionCodec) (*InMemoryExtensionCodecRegistry, error)
func (*InMemoryExtensionCodecRegistry) ListCodecs ¶
func (r *InMemoryExtensionCodecRegistry) ListCodecs() []ExtensionCodec
ListCodecs returns registered codecs ordered by extension key.
func (*InMemoryExtensionCodecRegistry) Register ¶
func (r *InMemoryExtensionCodecRegistry) Register(codec ExtensionCodec) error
type ProfileExtensionKey ¶
type ProfileExtensionKey[T any] struct { // contains filtered or unexported fields }
func MustProfileExtensionKey ¶
func MustProfileExtensionKey[T any](namespace, feature string, version uint16) ProfileExtensionKey[T]
func NewProfileExtensionKey ¶
func NewProfileExtensionKey[T any](namespace, feature string, version uint16) (ProfileExtensionKey[T], error)
func ProfileExtensionKeyFromID ¶
func ProfileExtensionKeyFromID[T any](id ExtensionKey) ProfileExtensionKey[T]
func (ProfileExtensionKey[T]) Decode ¶
func (k ProfileExtensionKey[T]) Decode(raw any) (T, error)
func (ProfileExtensionKey[T]) Delete ¶
func (k ProfileExtensionKey[T]) Delete(profile *EngineProfile)
func (ProfileExtensionKey[T]) Get ¶
func (k ProfileExtensionKey[T]) Get(profile *EngineProfile) (T, bool, error)
func (ProfileExtensionKey[T]) ID ¶
func (k ProfileExtensionKey[T]) ID() ExtensionKey
func (ProfileExtensionKey[T]) Set ¶
func (k ProfileExtensionKey[T]) Set(profile *EngineProfile, value T) error
func (ProfileExtensionKey[T]) String ¶
func (k ProfileExtensionKey[T]) String() string
type Registry ¶
type Registry interface {
RegistryReader
}
Registry is the unified profile registry service abstraction.
type RegistryMetadata ¶
type RegistryMetadata struct {
Source string `json:"source,omitempty" yaml:"source,omitempty"`
Version uint64 `json:"version,omitempty" yaml:"version,omitempty"`
CreatedAtMs int64 `json:"created_at_ms,omitempty" yaml:"created_at_ms,omitempty"`
UpdatedAtMs int64 `json:"updated_at_ms,omitempty" yaml:"updated_at_ms,omitempty"`
CreatedBy string `json:"created_by,omitempty" yaml:"created_by,omitempty"`
UpdatedBy string `json:"updated_by,omitempty" yaml:"updated_by,omitempty"`
Tags []string `json:"tags,omitempty" yaml:"tags,omitempty"`
}
RegistryMetadata stores provenance and version fields at registry scope.
type RegistryReader ¶
type RegistryReader interface {
ListRegistries(ctx context.Context) ([]RegistrySummary, error)
GetRegistry(ctx context.Context, registrySlug RegistrySlug) (*EngineProfileRegistry, error)
ListEngineProfiles(ctx context.Context, registrySlug RegistrySlug) ([]*EngineProfile, error)
GetEngineProfile(ctx context.Context, registrySlug RegistrySlug, profileSlug EngineProfileSlug) (*EngineProfile, error)
ResolveEngineProfile(ctx context.Context, in ResolveInput) (*ResolvedEngineProfile, error)
}
RegistryReader provides read/query operations for profile registry services.
type RegistrySlug ¶
type RegistrySlug string
func MustRegistrySlug ¶
func MustRegistrySlug(raw string) RegistrySlug
func ParseRegistrySlug ¶
func ParseRegistrySlug(raw string) (RegistrySlug, error)
func (RegistrySlug) IsZero ¶
func (s RegistrySlug) IsZero() bool
func (RegistrySlug) MarshalJSON ¶
func (s RegistrySlug) MarshalJSON() ([]byte, error)
func (RegistrySlug) MarshalText ¶
func (s RegistrySlug) MarshalText() ([]byte, error)
func (RegistrySlug) MarshalYAML ¶
func (s RegistrySlug) MarshalYAML() (interface{}, error)
func (RegistrySlug) String ¶
func (s RegistrySlug) String() string
func (*RegistrySlug) UnmarshalJSON ¶
func (s *RegistrySlug) UnmarshalJSON(data []byte) error
func (*RegistrySlug) UnmarshalText ¶
func (s *RegistrySlug) UnmarshalText(text []byte) error
func (*RegistrySlug) UnmarshalYAML ¶
func (s *RegistrySlug) UnmarshalYAML(value *yaml.Node) error
type RegistrySourceKind ¶
type RegistrySourceKind string
const ( RegistrySourceKindYAML RegistrySourceKind = "yaml" RegistrySourceKindSQLite RegistrySourceKind = "sqlite" RegistrySourceKindSQLiteDSN RegistrySourceKind = "sqlite-dsn" )
type RegistrySourceSpec ¶
type RegistrySourceSpec struct {
Raw string
Kind RegistrySourceKind
Path string
DSN string
}
func ParseRegistrySourceSpecs ¶
func ParseRegistrySourceSpecs(entries []string) ([]RegistrySourceSpec, error)
type RegistrySummary ¶
type RegistrySummary struct {
Slug RegistrySlug `json:"slug" yaml:"slug"`
DisplayName string `json:"display_name,omitempty" yaml:"display_name,omitempty"`
DefaultEngineProfileSlug EngineProfileSlug `json:"default_profile_slug,omitempty" yaml:"default_profile_slug,omitempty"`
EngineProfileCount int `json:"profile_count" yaml:"profile_count"`
}
RegistrySummary gives lightweight metadata for list endpoints.
type ResolveInput ¶
type ResolveInput struct {
RegistrySlug RegistrySlug
EngineProfileSlug EngineProfileSlug
}
ResolveInput contains all inputs needed to compute an effective engine profile.
type ResolvedEngineProfile ¶
type ResolvedEngineProfile struct {
RegistrySlug RegistrySlug
EngineProfileSlug EngineProfileSlug
InferenceSettings *aistepssettings.InferenceSettings
StackLineage []ResolvedProfileStackEntry
Metadata map[string]any
}
ResolvedEngineProfile is the canonical result of engine profile resolution.
type ResolvedProfileStackEntry ¶ added in v0.11.8
type ResolvedProfileStackEntry struct {
RegistrySlug RegistrySlug `json:"registry_slug" yaml:"registry_slug"`
EngineProfileSlug EngineProfileSlug `json:"profile_slug" yaml:"profile_slug"`
Version uint64 `json:"version,omitempty" yaml:"version,omitempty"`
Source string `json:"source,omitempty" yaml:"source,omitempty"`
}
ResolvedProfileStackEntry captures one base->leaf stack entry in typed form.
type SQLiteEngineProfileStore ¶
type SQLiteEngineProfileStore struct {
// contains filtered or unexported fields
}
SQLiteEngineProfileStore persists registries in a SQLite database.
Storage format intentionally keeps one JSON payload per registry row so the domain schema can evolve without SQL column churn while still using durable SQLite persistence and migration/versioning controls.
func NewSQLiteEngineProfileStore ¶
func NewSQLiteEngineProfileStore(dsn string, defaultRegistrySlug RegistrySlug) (*SQLiteEngineProfileStore, error)
func (*SQLiteEngineProfileStore) Close ¶
func (s *SQLiteEngineProfileStore) Close() error
func (*SQLiteEngineProfileStore) DeleteRegistry ¶
func (s *SQLiteEngineProfileStore) DeleteRegistry(ctx context.Context, registrySlug RegistrySlug, opts SaveOptions) error
func (*SQLiteEngineProfileStore) GetEngineProfile ¶
func (s *SQLiteEngineProfileStore) GetEngineProfile(ctx context.Context, registrySlug RegistrySlug, profileSlug EngineProfileSlug) (*EngineProfile, bool, error)
func (*SQLiteEngineProfileStore) GetRegistry ¶
func (s *SQLiteEngineProfileStore) GetRegistry(ctx context.Context, registrySlug RegistrySlug) (*EngineProfileRegistry, bool, error)
func (*SQLiteEngineProfileStore) ListEngineProfiles ¶
func (s *SQLiteEngineProfileStore) ListEngineProfiles(ctx context.Context, registrySlug RegistrySlug) ([]*EngineProfile, error)
func (*SQLiteEngineProfileStore) ListRegistries ¶
func (s *SQLiteEngineProfileStore) ListRegistries(ctx context.Context) ([]*EngineProfileRegistry, error)
func (*SQLiteEngineProfileStore) UpsertEngineProfile ¶
func (s *SQLiteEngineProfileStore) UpsertEngineProfile(ctx context.Context, registrySlug RegistrySlug, profile *EngineProfile, opts SaveOptions) error
func (*SQLiteEngineProfileStore) UpsertRegistry ¶
func (s *SQLiteEngineProfileStore) UpsertRegistry(ctx context.Context, registry *EngineProfileRegistry, opts SaveOptions) error
type SaveOptions ¶
SaveOptions carries write context for profile/registry persistence.
type StackMergeResult ¶
type StackMergeResult struct {
InferenceSettings *aistepssettings.InferenceSettings
Extensions map[string]any
}
func MergeEngineProfileStackLayers ¶
func MergeEngineProfileStackLayers(layers []EngineProfileStackLayer) (StackMergeResult, error)
MergeEngineProfileStackLayers merges base->leaf stack layers deterministically.
type StackResolverOptions ¶
type StackResolverOptions struct {
MaxDepth int
}
type StackValidationOptions ¶
type StoreRegistry ¶
type StoreRegistry struct {
// contains filtered or unexported fields
}
StoreRegistry is the default Registry implementation backed by an EngineProfileStore.
func NewStoreRegistry ¶
func NewStoreRegistry(store EngineProfileStore, defaultRegistrySlug RegistrySlug, options ...StoreRegistryOption) (*StoreRegistry, error)
func (*StoreRegistry) ExpandEngineProfileStack ¶
func (r *StoreRegistry) ExpandEngineProfileStack(ctx context.Context, registrySlug RegistrySlug, profileSlug EngineProfileSlug, opts StackResolverOptions) ([]EngineProfileStackLayer, error)
ExpandEngineProfileStack resolves a profile's stack into deterministic base->leaf layers. The result always includes the root profile as the final layer.
func (*StoreRegistry) GetEngineProfile ¶
func (r *StoreRegistry) GetEngineProfile(ctx context.Context, registrySlug RegistrySlug, profileSlug EngineProfileSlug) (*EngineProfile, error)
func (*StoreRegistry) GetRegistry ¶
func (r *StoreRegistry) GetRegistry(ctx context.Context, registrySlug RegistrySlug) (*EngineProfileRegistry, error)
func (*StoreRegistry) ListEngineProfiles ¶
func (r *StoreRegistry) ListEngineProfiles(ctx context.Context, registrySlug RegistrySlug) ([]*EngineProfile, error)
func (*StoreRegistry) ListRegistries ¶
func (r *StoreRegistry) ListRegistries(ctx context.Context) ([]RegistrySummary, error)
func (*StoreRegistry) ResolveEngineProfile ¶
func (r *StoreRegistry) ResolveEngineProfile(ctx context.Context, in ResolveInput) (*ResolvedEngineProfile, error)
type StoreRegistryOption ¶
type StoreRegistryOption func(*StoreRegistry) error
type ValidationError ¶
ValidationError reports invalid domain data.
func (*ValidationError) Error ¶
func (e *ValidationError) Error() string
func (*ValidationError) Is ¶
func (e *ValidationError) Is(target error) bool
type VersionConflictError ¶
VersionConflictError reports optimistic-locking failures.
func (*VersionConflictError) Error ¶
func (e *VersionConflictError) Error() string
func (*VersionConflictError) Is ¶
func (e *VersionConflictError) Is(target error) bool
type YAMLFileEngineProfileStore ¶
type YAMLFileEngineProfileStore struct {
// contains filtered or unexported fields
}
YAMLFileEngineProfileStore persists registries as YAML on disk.
func NewYAMLFileEngineProfileStore ¶
func NewYAMLFileEngineProfileStore(path string, defaultRegistrySlug RegistrySlug) (*YAMLFileEngineProfileStore, error)
func (*YAMLFileEngineProfileStore) Close ¶
func (s *YAMLFileEngineProfileStore) Close() error
func (*YAMLFileEngineProfileStore) DeleteRegistry ¶
func (s *YAMLFileEngineProfileStore) DeleteRegistry(ctx context.Context, registrySlug RegistrySlug, opts SaveOptions) error
func (*YAMLFileEngineProfileStore) GetEngineProfile ¶
func (s *YAMLFileEngineProfileStore) GetEngineProfile(ctx context.Context, registrySlug RegistrySlug, profileSlug EngineProfileSlug) (*EngineProfile, bool, error)
func (*YAMLFileEngineProfileStore) GetRegistry ¶
func (s *YAMLFileEngineProfileStore) GetRegistry(ctx context.Context, registrySlug RegistrySlug) (*EngineProfileRegistry, bool, error)
func (*YAMLFileEngineProfileStore) ListEngineProfiles ¶
func (s *YAMLFileEngineProfileStore) ListEngineProfiles(ctx context.Context, registrySlug RegistrySlug) ([]*EngineProfile, error)
func (*YAMLFileEngineProfileStore) ListRegistries ¶
func (s *YAMLFileEngineProfileStore) ListRegistries(ctx context.Context) ([]*EngineProfileRegistry, error)
func (*YAMLFileEngineProfileStore) UpsertEngineProfile ¶
func (s *YAMLFileEngineProfileStore) UpsertEngineProfile(ctx context.Context, registrySlug RegistrySlug, profile *EngineProfile, opts SaveOptions) error
func (*YAMLFileEngineProfileStore) UpsertRegistry ¶
func (s *YAMLFileEngineProfileStore) UpsertRegistry(ctx context.Context, registry *EngineProfileRegistry, opts SaveOptions) error