Catalog API¶
The catalog is the machine-readable public inventory of built-in models, transformers, and similarity engines. See the application integration guide for the configuration format and ownership boundary.
Configuration¶
ComponentConfig
dataclass
¶
A catalog component identifier and its constructor parameters.
from_mapping
classmethod
¶
from_mapping(value: Mapping[str, object]) -> ComponentConfig
Parse a strict JSON-compatible component object.
as_dict ¶
Return a detached JSON-compatible representation when values permit.
DetectorConfig
dataclass
¶
DetectorConfig(model: ComponentConfig, transformers: tuple[ComponentConfig, ...] = ())
Declarative configuration for transformers followed by one model.
from_mapping
classmethod
¶
from_mapping(value: Mapping[str, object]) -> DetectorConfig
Parse the versioned, strict detector configuration format.
as_dict ¶
Return the canonical JSON-compatible configuration shape.
fingerprint ¶
Return a deterministic SHA-256 digest of the canonical configuration.
normalized ¶
normalized() -> DetectorConfig
Return a copy with constructor defaults and Python types resolved.
capabilities ¶
capabilities() -> ModelCapabilities
Resolve and validate the configured detector's operational metadata.
build_detector ¶
build_detector(config: DetectorConfig | Mapping[str, object]) -> ModelProtocol
Validate and construct a model-ending pipeline from declarative config.
create_model ¶
create_model(component_id: str, params: Mapping[str, object] | None = None) -> ModelProtocol
Construct an allowlisted built-in model.
create_transformer ¶
create_transformer(component_id: str, params: Mapping[str, object] | None = None) -> TransformerProtocol
Construct an allowlisted built-in transformer.
create_similarity_engine ¶
create_similarity_engine(component_id: str, params: Mapping[str, object] | None = None) -> BaseSimilaritySearchEngine
Construct an allowlisted built-in similarity-search engine.
detector_capabilities ¶
detector_capabilities(config: DetectorConfig | Mapping[str, object]) -> ModelCapabilities
Resolve capabilities and reject statically incompatible feature widths.
normalize_detector_config ¶
normalize_detector_config(config: DetectorConfig | Mapping[str, object]) -> DetectorConfig
Validate identifiers and parameter types, then apply constructor defaults.
Metadata¶
ComponentSpec
dataclass
¶
ComponentSpec(*, id: str, display_name: str, kind: ComponentKind, family: str, import_path: str, optional_extra: str | None = None, dependency_module: str | None = None, declarative: bool = True, dependencies: tuple[ComponentDependency, ...] = ())
Public metadata and construction entry point for one built-in component.
available
property
¶
Whether optional runtime dependencies for this component are installed.
resolved_parameters ¶
resolved_parameters(params: Mapping[str, object] | None = None, *, require_all: bool = False) -> dict[str, object]
Bind parameters to the public constructor and apply its defaults.
parameter_schema ¶
Inspect constructor parameters, loading the component's runtime.
as_dict ¶
Return catalog metadata, deferring optional-runtime inspection.
ModelSpec
dataclass
¶
ModelSpec(*, id: str, display_name: str, kind: ComponentKind, family: str, import_path: str, optional_extra: str | None = None, dependency_module: str | None = None, declarative: bool = True, dependencies: tuple[ComponentDependency, ...] = (), _capability_resolver: CapabilityResolver)
Bases: ComponentSpec
Catalog entry for a model with configuration-resolved capabilities.
capabilities ¶
capabilities(params: Mapping[str, object] | None = None) -> ModelCapabilities
Resolve operational capabilities using constructor defaults.
TransformerSpec
dataclass
¶
TransformerSpec(*, id: str, display_name: str, kind: ComponentKind, family: str, import_path: str, optional_extra: str | None = None, dependency_module: str | None = None, declarative: bool = True, dependencies: tuple[ComponentDependency, ...] = (), _feature_count_resolver: FeatureCountResolver)
Bases: ComponentSpec
Catalog entry for a transformer and its output feature shape.
output_feature_count ¶
output_feature_count(params: Mapping[str, object] | None, input_feature_count: int | None) -> int | None
Resolve the transformer's output width when it can be known.
ModelCapabilities
dataclass
¶
ModelCapabilities(event_kind: EventKind, feature_count: FeatureCount, feature_schema: FeatureSchemaKind, score_kind: ScoreKind, higher_is_more_anomalous: bool | None, warmup: WarmupRequirement, state: StateKind, resettable: bool, requires_unit_interval: bool = False)
Resolved operational facts for one model configuration.
FeatureCount
dataclass
¶
WarmupRequirement
dataclass
¶
WarmupRequirement(minimum: int | None, unit: WarmupUnit = EVENTS)
catalog_manifest ¶
Describe every built-in component without importing optional runtimes.
get_model_spec ¶
get_model_spec(component_id: str) -> ModelSpec
Return one model entry or raise UnknownComponentError.
get_transformer_spec ¶
get_transformer_spec(component_id: str) -> TransformerSpec
Return one transformer entry or raise UnknownComponentError.
get_similarity_engine_spec ¶
get_similarity_engine_spec(component_id: str) -> ComponentSpec
Return one similarity-engine entry or raise UnknownComponentError.
Enumerations¶
ComponentKind ¶
Bases: str, Enum
Kinds of components exposed by the catalog.
EventKind ¶
Bases: str, Enum
Structural shape expected by a model.
FeatureSchemaKind ¶
Bases: str, Enum
How a model treats feature names after construction or first learning.
ScoreKind ¶
Bases: str, Enum
Broad numeric contract of a model's anomaly score.
StateKind ¶
Bases: str, Enum
How model state grows as a stream is processed.
WarmupUnit ¶
Bases: str, Enum
Unit used to express a model's readiness requirement.