File size: 2,397 Bytes
d2d1903 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 | """
orgstate.core — the pure analytical core of OrgState Engine.
This package is intentionally dependency-free (stdlib only) and I/O-free.
It contains the canonical data model and the deterministic signal/drift math.
Everything else (storage, API, connectors, verticals, delivery) builds on top.
Stage 0 migration: events, state, ontology, signals, drift, decisions were
moved here verbatim from legacy/orgstate_engine/ — they had zero cross-imports,
so no import rewrites were needed. See ../MIGRATION_MAP.md.
"""
from .calibration import (
Calibration,
MetricCalibration,
calibrate,
robust_scale,
)
from .config import (
HIGHER_IS_WORSE,
LOWER_IS_WORSE,
EntityTypeConfig,
MetricConfig,
VerticalConfig,
load_yaml_config,
)
from .decisions import DecisionItem, recommendation_for_issue
from .drift import (
DEFAULT_DRIFT_WEIGHTS,
DEFAULT_SEVERITY_THRESHOLDS,
DriftIssue,
drift_score,
severity_from_score,
)
from .events import CanonicalEvent
from .ontology import ENTITY_TYPES, Entity
from .pipeline import (
Observation,
PipelineResult,
calibrate_from_observations,
collect_history,
run_pipeline,
)
from .signals import (
anomaly_xi,
change_delta,
coefficient_of_variation,
coherence_kappa,
health_omega,
latency_gamma,
safe_mean,
safe_std,
stability_psi,
weighted_geometric_mean,
)
from .state import EntityState
__all__ = [
# data model
"CanonicalEvent",
"EntityState",
"Entity",
"ENTITY_TYPES",
# signals
"safe_mean",
"safe_std",
"coefficient_of_variation",
"stability_psi",
"anomaly_xi",
"change_delta",
"latency_gamma",
"coherence_kappa",
"weighted_geometric_mean",
"health_omega",
# drift / decisions
"DriftIssue",
"drift_score",
"severity_from_score",
"DEFAULT_DRIFT_WEIGHTS",
"DEFAULT_SEVERITY_THRESHOLDS",
"DecisionItem",
"recommendation_for_issue",
# config (Stage 1)
"MetricConfig",
"EntityTypeConfig",
"VerticalConfig",
"load_yaml_config",
"HIGHER_IS_WORSE",
"LOWER_IS_WORSE",
# calibration (Stage 1)
"MetricCalibration",
"Calibration",
"calibrate",
"robust_scale",
# pipeline (Stage 1)
"Observation",
"PipelineResult",
"run_pipeline",
"calibrate_from_observations",
"collect_history",
]
|