Files
zeekay 1b367e2b62 chore: rebase the tree onto upstream master
The tree was a debranded snapshot of upstream taken around 2026-02-20, and
upstream has moved about five months since. This replaces it with upstream
master, mechanically re-derived: bin/debrand does the rename, and the
pipeline and squashed migrations are restored from the shipped tree.

Not a merge. The previous import replaced the tree wholesale in a single
commit, so there is no shared content history to merge against. Reproducing
the rename on the new tree is what actually converges.

What survives: .hanzo/workflows, the Dockerfiles and bin/docker* entrypoints,
compose files, LLM.md, and insights/migrations. The squashed initial
migration is load-bearing — the live database records it by name, so
upstream's ~918 individual migrations cannot come back.

Nine products are dropped as unreferenced. Twenty-one more that we do not run
are kept anyway because the core app still imports them; unpicking those is a
refactor and does not belong in a rebase.

This base does not build yet, and the reasons are not in the rename:
upstream now wants Python 3.13.13 against our 3.12.12 and Django 5.2 against
our 4.2, and the dependency manifests still name upstream packages that we
republish under our own names. Those are decisions, not renames.
2026-08-01 15:44:40 -07:00

2220 lines
127 KiB
JSON

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"config": {
"anyOf": [
{
"anyOf": [
{
"properties": {
"check_ongoing_interval": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"description": "When true, evaluate the current (still incomplete) time interval in addition to completed ones."
},
"series_index": {
"description": "Zero-based index of the series in the insight's query to monitor.",
"type": "number"
},
"type": {
"default": "TrendsAlertConfig",
"enum": ["TrendsAlertConfig"],
"type": "string"
}
},
"required": ["series_index"],
"type": "object"
},
{
"properties": {
"column": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"description": "Name of the result column to evaluate. When unset, the single numeric column is used (an error if the result has more than one numeric column)."
},
"evaluation": {
"description": "How to read the result rows — an explicit choice, no implicit default.",
"enum": ["last_row", "first_row", "any_row"],
"type": "string"
},
"label_column": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"description": "Column whose value labels the evaluated row(s) in breach messages: every row in `any_row` mode, or the single evaluated row in `last_row`/`first_row`. When unset, the first non-evaluated column is used, falling back to the row number (any_row) or the value column name (last_row/first_row)."
},
"type": {
"default": "InsightsQLAlertConfig",
"enum": ["InsightsQLAlertConfig"],
"type": "string"
}
},
"required": ["evaluation"],
"type": "object"
},
{
"properties": {
"check_ongoing_interval": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"description": "When true, evaluate the current (still in-progress) period; by default only completed periods are used."
},
"funnel_step": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Zero-based step index to evaluate. Null = the last step (overall conversion)."
},
"metric": {
"enum": ["conversion_from_start", "conversion_from_previous"],
"type": "string"
},
"type": {
"default": "FunnelsAlertConfig",
"enum": ["FunnelsAlertConfig"],
"type": "string"
}
},
"required": ["metric"],
"type": "object"
},
{
"properties": {
"check_ongoing_interval": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"description": "When true, anchor on the trailing (possibly still accumulating) bucket instead of the last complete one."
},
"type": {
"default": "MetricsAlertConfig",
"enum": ["MetricsAlertConfig"],
"type": "string"
}
},
"type": "object"
}
],
"description": "Per-insight-kind alert config, discriminated by ``type`` — keeps the OpenAPI (and the\ngenerated frontend types and MCP tool schemas) in sync with every kind alerts support."
},
{
"type": "null"
}
],
"description": "Per-insight-kind alert config. For SQL insights, selects the evaluated column and read direction (last_row/first_row) so the preview matches the alert; ignored for trends."
},
"date_from": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"description": "Relative date string for how far back to simulate (e.g. '-24h', '-30d', '-4w'). If not provided, uses the detector's minimum required samples. Trends insights only — a SQL query's own rows are the series."
},
"detector_config": {
"anyOf": [
{
"properties": {
"detectors": {
"description": "Sub-detector configurations (minimum 2)",
"items": {
"anyOf": [
{
"properties": {
"preprocessing": {
"anyOf": [
{
"properties": {
"diffs_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Order of differencing. 0 = raw values, 1 = first-order diffs (default: 0)"
},
"lags_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Number of lag features. 0 = none, >0 = include n lagged values (default: 0)"
},
"smooth_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Moving average window size. 0 = no smoothing, >1 = smooth over n points (default: 0)"
}
},
"type": "object"
},
{
"type": "null"
}
],
"description": "Preprocessing transforms applied before detection"
},
"threshold": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Anomaly probability threshold [0-1]. Points above this probability are flagged (default: 0.9)"
},
"type": {
"default": "zscore",
"enum": ["zscore"],
"type": "string"
},
"window": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Rolling window size for calculating mean/std (default: 30)"
}
},
"type": "object"
},
{
"properties": {
"preprocessing": {
"anyOf": [
{
"properties": {
"diffs_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Order of differencing. 0 = raw values, 1 = first-order diffs (default: 0)"
},
"lags_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Number of lag features. 0 = none, >0 = include n lagged values (default: 0)"
},
"smooth_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Moving average window size. 0 = no smoothing, >1 = smooth over n points (default: 0)"
}
},
"type": "object"
},
{
"type": "null"
}
],
"description": "Preprocessing transforms applied before detection"
},
"threshold": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Anomaly probability threshold [0-1]. Points above this probability are flagged (default: 0.9)"
},
"type": {
"default": "mad",
"enum": ["mad"],
"type": "string"
},
"window": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Rolling window size for calculating median/MAD (default: 30)"
}
},
"type": "object"
},
{
"properties": {
"multiplier": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "IQR multiplier for fence calculation (default: 1.5, use 3.0 for far outliers)"
},
"preprocessing": {
"anyOf": [
{
"properties": {
"diffs_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Order of differencing. 0 = raw values, 1 = first-order diffs (default: 0)"
},
"lags_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Number of lag features. 0 = none, >0 = include n lagged values (default: 0)"
},
"smooth_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Moving average window size. 0 = no smoothing, >1 = smooth over n points (default: 0)"
}
},
"type": "object"
},
{
"type": "null"
}
],
"description": "Preprocessing transforms applied before detection"
},
"type": {
"default": "iqr",
"enum": ["iqr"],
"type": "string"
},
"window": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Rolling window size for calculating quartiles (default: 30)"
}
},
"type": "object"
},
{
"properties": {
"lower_bound": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Lower bound - values below this are anomalies"
},
"preprocessing": {
"anyOf": [
{
"properties": {
"diffs_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Order of differencing. 0 = raw values, 1 = first-order diffs (default: 0)"
},
"lags_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Number of lag features. 0 = none, >0 = include n lagged values (default: 0)"
},
"smooth_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Moving average window size. 0 = no smoothing, >1 = smooth over n points (default: 0)"
}
},
"type": "object"
},
{
"type": "null"
}
],
"description": "Preprocessing transforms applied before detection"
},
"type": {
"default": "threshold",
"enum": ["threshold"],
"type": "string"
},
"upper_bound": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Upper bound - values above this are anomalies"
}
},
"type": "object"
},
{
"properties": {
"preprocessing": {
"anyOf": [
{
"properties": {
"diffs_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Order of differencing. 0 = raw values, 1 = first-order diffs (default: 0)"
},
"lags_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Number of lag features. 0 = none, >0 = include n lagged values (default: 0)"
},
"smooth_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Moving average window size. 0 = no smoothing, >1 = smooth over n points (default: 0)"
}
},
"type": "object"
},
{
"type": "null"
}
],
"description": "Preprocessing transforms applied before detection"
},
"threshold": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Anomaly probability threshold (default: 0.9)"
},
"type": {
"default": "ecod",
"enum": ["ecod"],
"type": "string"
},
"window": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Rolling window size — how many historical data points to train on (default: based on calculation interval)"
}
},
"type": "object"
},
{
"properties": {
"preprocessing": {
"anyOf": [
{
"properties": {
"diffs_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Order of differencing. 0 = raw values, 1 = first-order diffs (default: 0)"
},
"lags_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Number of lag features. 0 = none, >0 = include n lagged values (default: 0)"
},
"smooth_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Moving average window size. 0 = no smoothing, >1 = smooth over n points (default: 0)"
}
},
"type": "object"
},
{
"type": "null"
}
],
"description": "Preprocessing transforms applied before detection"
},
"threshold": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Anomaly probability threshold (default: 0.9)"
},
"type": {
"default": "copod",
"enum": ["copod"],
"type": "string"
},
"window": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Rolling window size — how many historical data points to train on (default: based on calculation interval)"
}
},
"type": "object"
},
{
"properties": {
"n_estimators": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Number of trees in the forest (default: 100)"
},
"preprocessing": {
"anyOf": [
{
"properties": {
"diffs_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Order of differencing. 0 = raw values, 1 = first-order diffs (default: 0)"
},
"lags_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Number of lag features. 0 = none, >0 = include n lagged values (default: 0)"
},
"smooth_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Moving average window size. 0 = no smoothing, >1 = smooth over n points (default: 0)"
}
},
"type": "object"
},
{
"type": "null"
}
],
"description": "Preprocessing transforms applied before detection"
},
"threshold": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Anomaly probability threshold (default: 0.9)"
},
"type": {
"default": "isolation_forest",
"enum": ["isolation_forest"],
"type": "string"
},
"window": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Rolling window size — how many historical data points to train on (default: based on calculation interval)"
}
},
"type": "object"
},
{
"properties": {
"method": {
"anyOf": [
{
"enum": ["largest", "mean", "median"],
"type": "string"
},
{
"type": "null"
}
],
"description": "Distance method: 'largest', 'mean', 'median' (default: 'largest')"
},
"n_neighbors": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Number of neighbors to consider (default: 5)"
},
"preprocessing": {
"anyOf": [
{
"properties": {
"diffs_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Order of differencing. 0 = raw values, 1 = first-order diffs (default: 0)"
},
"lags_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Number of lag features. 0 = none, >0 = include n lagged values (default: 0)"
},
"smooth_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Moving average window size. 0 = no smoothing, >1 = smooth over n points (default: 0)"
}
},
"type": "object"
},
{
"type": "null"
}
],
"description": "Preprocessing transforms applied before detection"
},
"threshold": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Anomaly probability threshold (default: 0.9)"
},
"type": {
"default": "knn",
"enum": ["knn"],
"type": "string"
},
"window": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Rolling window size — how many historical data points to train on (default: based on calculation interval)"
}
},
"type": "object"
},
{
"properties": {
"n_bins": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Number of histogram bins (default: 10)"
},
"preprocessing": {
"anyOf": [
{
"properties": {
"diffs_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Order of differencing. 0 = raw values, 1 = first-order diffs (default: 0)"
},
"lags_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Number of lag features. 0 = none, >0 = include n lagged values (default: 0)"
},
"smooth_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Moving average window size. 0 = no smoothing, >1 = smooth over n points (default: 0)"
}
},
"type": "object"
},
{
"type": "null"
}
],
"description": "Preprocessing transforms applied before detection"
},
"threshold": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Anomaly probability threshold (default: 0.9)"
},
"type": {
"default": "hbos",
"enum": ["hbos"],
"type": "string"
},
"window": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Rolling window size — how many historical data points to train on (default: based on calculation interval)"
}
},
"type": "object"
},
{
"properties": {
"n_neighbors": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Number of neighbors for LOF (default: 20)"
},
"preprocessing": {
"anyOf": [
{
"properties": {
"diffs_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Order of differencing. 0 = raw values, 1 = first-order diffs (default: 0)"
},
"lags_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Number of lag features. 0 = none, >0 = include n lagged values (default: 0)"
},
"smooth_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Moving average window size. 0 = no smoothing, >1 = smooth over n points (default: 0)"
}
},
"type": "object"
},
{
"type": "null"
}
],
"description": "Preprocessing transforms applied before detection"
},
"threshold": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Anomaly probability threshold (default: 0.9)"
},
"type": {
"default": "lof",
"enum": ["lof"],
"type": "string"
},
"window": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Rolling window size — how many historical data points to train on (default: based on calculation interval)"
}
},
"type": "object"
},
{
"properties": {
"kernel": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"description": "SVM kernel type (default: \"rbf\")"
},
"nu": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Upper bound on training errors fraction (default: 0.1)"
},
"preprocessing": {
"anyOf": [
{
"properties": {
"diffs_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Order of differencing. 0 = raw values, 1 = first-order diffs (default: 0)"
},
"lags_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Number of lag features. 0 = none, >0 = include n lagged values (default: 0)"
},
"smooth_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Moving average window size. 0 = no smoothing, >1 = smooth over n points (default: 0)"
}
},
"type": "object"
},
{
"type": "null"
}
],
"description": "Preprocessing transforms applied before detection"
},
"threshold": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Anomaly probability threshold (default: 0.9)"
},
"type": {
"default": "ocsvm",
"enum": ["ocsvm"],
"type": "string"
},
"window": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Rolling window size — how many historical data points to train on (default: based on calculation interval)"
}
},
"type": "object"
},
{
"properties": {
"preprocessing": {
"anyOf": [
{
"properties": {
"diffs_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Order of differencing. 0 = raw values, 1 = first-order diffs (default: 0)"
},
"lags_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Number of lag features. 0 = none, >0 = include n lagged values (default: 0)"
},
"smooth_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Moving average window size. 0 = no smoothing, >1 = smooth over n points (default: 0)"
}
},
"type": "object"
},
{
"type": "null"
}
],
"description": "Preprocessing transforms applied before detection"
},
"threshold": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Anomaly probability threshold (default: 0.9)"
},
"type": {
"default": "pca",
"enum": ["pca"],
"type": "string"
},
"window": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Rolling window size — how many historical data points to train on (default: based on calculation interval)"
}
},
"type": "object"
}
]
},
"type": "array"
},
"operator": {
"description": "How to combine sub-detector results",
"enum": ["and", "or"],
"type": "string"
},
"type": {
"default": "ensemble",
"enum": ["ensemble"],
"type": "string"
}
},
"required": ["detectors", "operator"],
"type": "object"
},
{
"properties": {
"preprocessing": {
"anyOf": [
{
"properties": {
"diffs_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Order of differencing. 0 = raw values, 1 = first-order diffs (default: 0)"
},
"lags_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Number of lag features. 0 = none, >0 = include n lagged values (default: 0)"
},
"smooth_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Moving average window size. 0 = no smoothing, >1 = smooth over n points (default: 0)"
}
},
"type": "object"
},
{
"type": "null"
}
],
"description": "Preprocessing transforms applied before detection"
},
"threshold": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Anomaly probability threshold [0-1]. Points above this probability are flagged (default: 0.9)"
},
"type": {
"default": "zscore",
"enum": ["zscore"],
"type": "string"
},
"window": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Rolling window size for calculating mean/std (default: 30)"
}
},
"type": "object"
},
{
"properties": {
"preprocessing": {
"anyOf": [
{
"properties": {
"diffs_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Order of differencing. 0 = raw values, 1 = first-order diffs (default: 0)"
},
"lags_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Number of lag features. 0 = none, >0 = include n lagged values (default: 0)"
},
"smooth_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Moving average window size. 0 = no smoothing, >1 = smooth over n points (default: 0)"
}
},
"type": "object"
},
{
"type": "null"
}
],
"description": "Preprocessing transforms applied before detection"
},
"threshold": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Anomaly probability threshold [0-1]. Points above this probability are flagged (default: 0.9)"
},
"type": {
"default": "mad",
"enum": ["mad"],
"type": "string"
},
"window": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Rolling window size for calculating median/MAD (default: 30)"
}
},
"type": "object"
},
{
"properties": {
"multiplier": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "IQR multiplier for fence calculation (default: 1.5, use 3.0 for far outliers)"
},
"preprocessing": {
"anyOf": [
{
"properties": {
"diffs_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Order of differencing. 0 = raw values, 1 = first-order diffs (default: 0)"
},
"lags_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Number of lag features. 0 = none, >0 = include n lagged values (default: 0)"
},
"smooth_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Moving average window size. 0 = no smoothing, >1 = smooth over n points (default: 0)"
}
},
"type": "object"
},
{
"type": "null"
}
],
"description": "Preprocessing transforms applied before detection"
},
"type": {
"default": "iqr",
"enum": ["iqr"],
"type": "string"
},
"window": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Rolling window size for calculating quartiles (default: 30)"
}
},
"type": "object"
},
{
"properties": {
"lower_bound": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Lower bound - values below this are anomalies"
},
"preprocessing": {
"anyOf": [
{
"properties": {
"diffs_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Order of differencing. 0 = raw values, 1 = first-order diffs (default: 0)"
},
"lags_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Number of lag features. 0 = none, >0 = include n lagged values (default: 0)"
},
"smooth_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Moving average window size. 0 = no smoothing, >1 = smooth over n points (default: 0)"
}
},
"type": "object"
},
{
"type": "null"
}
],
"description": "Preprocessing transforms applied before detection"
},
"type": {
"default": "threshold",
"enum": ["threshold"],
"type": "string"
},
"upper_bound": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Upper bound - values above this are anomalies"
}
},
"type": "object"
},
{
"properties": {
"preprocessing": {
"anyOf": [
{
"properties": {
"diffs_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Order of differencing. 0 = raw values, 1 = first-order diffs (default: 0)"
},
"lags_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Number of lag features. 0 = none, >0 = include n lagged values (default: 0)"
},
"smooth_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Moving average window size. 0 = no smoothing, >1 = smooth over n points (default: 0)"
}
},
"type": "object"
},
{
"type": "null"
}
],
"description": "Preprocessing transforms applied before detection"
},
"threshold": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Anomaly probability threshold (default: 0.9)"
},
"type": {
"default": "ecod",
"enum": ["ecod"],
"type": "string"
},
"window": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Rolling window size — how many historical data points to train on (default: based on calculation interval)"
}
},
"type": "object"
},
{
"properties": {
"preprocessing": {
"anyOf": [
{
"properties": {
"diffs_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Order of differencing. 0 = raw values, 1 = first-order diffs (default: 0)"
},
"lags_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Number of lag features. 0 = none, >0 = include n lagged values (default: 0)"
},
"smooth_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Moving average window size. 0 = no smoothing, >1 = smooth over n points (default: 0)"
}
},
"type": "object"
},
{
"type": "null"
}
],
"description": "Preprocessing transforms applied before detection"
},
"threshold": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Anomaly probability threshold (default: 0.9)"
},
"type": {
"default": "copod",
"enum": ["copod"],
"type": "string"
},
"window": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Rolling window size — how many historical data points to train on (default: based on calculation interval)"
}
},
"type": "object"
},
{
"properties": {
"n_estimators": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Number of trees in the forest (default: 100)"
},
"preprocessing": {
"anyOf": [
{
"properties": {
"diffs_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Order of differencing. 0 = raw values, 1 = first-order diffs (default: 0)"
},
"lags_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Number of lag features. 0 = none, >0 = include n lagged values (default: 0)"
},
"smooth_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Moving average window size. 0 = no smoothing, >1 = smooth over n points (default: 0)"
}
},
"type": "object"
},
{
"type": "null"
}
],
"description": "Preprocessing transforms applied before detection"
},
"threshold": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Anomaly probability threshold (default: 0.9)"
},
"type": {
"default": "isolation_forest",
"enum": ["isolation_forest"],
"type": "string"
},
"window": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Rolling window size — how many historical data points to train on (default: based on calculation interval)"
}
},
"type": "object"
},
{
"properties": {
"method": {
"anyOf": [
{
"enum": ["largest", "mean", "median"],
"type": "string"
},
{
"type": "null"
}
],
"description": "Distance method: 'largest', 'mean', 'median' (default: 'largest')"
},
"n_neighbors": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Number of neighbors to consider (default: 5)"
},
"preprocessing": {
"anyOf": [
{
"properties": {
"diffs_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Order of differencing. 0 = raw values, 1 = first-order diffs (default: 0)"
},
"lags_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Number of lag features. 0 = none, >0 = include n lagged values (default: 0)"
},
"smooth_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Moving average window size. 0 = no smoothing, >1 = smooth over n points (default: 0)"
}
},
"type": "object"
},
{
"type": "null"
}
],
"description": "Preprocessing transforms applied before detection"
},
"threshold": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Anomaly probability threshold (default: 0.9)"
},
"type": {
"default": "knn",
"enum": ["knn"],
"type": "string"
},
"window": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Rolling window size — how many historical data points to train on (default: based on calculation interval)"
}
},
"type": "object"
},
{
"properties": {
"n_bins": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Number of histogram bins (default: 10)"
},
"preprocessing": {
"anyOf": [
{
"properties": {
"diffs_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Order of differencing. 0 = raw values, 1 = first-order diffs (default: 0)"
},
"lags_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Number of lag features. 0 = none, >0 = include n lagged values (default: 0)"
},
"smooth_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Moving average window size. 0 = no smoothing, >1 = smooth over n points (default: 0)"
}
},
"type": "object"
},
{
"type": "null"
}
],
"description": "Preprocessing transforms applied before detection"
},
"threshold": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Anomaly probability threshold (default: 0.9)"
},
"type": {
"default": "hbos",
"enum": ["hbos"],
"type": "string"
},
"window": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Rolling window size — how many historical data points to train on (default: based on calculation interval)"
}
},
"type": "object"
},
{
"properties": {
"n_neighbors": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Number of neighbors for LOF (default: 20)"
},
"preprocessing": {
"anyOf": [
{
"properties": {
"diffs_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Order of differencing. 0 = raw values, 1 = first-order diffs (default: 0)"
},
"lags_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Number of lag features. 0 = none, >0 = include n lagged values (default: 0)"
},
"smooth_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Moving average window size. 0 = no smoothing, >1 = smooth over n points (default: 0)"
}
},
"type": "object"
},
{
"type": "null"
}
],
"description": "Preprocessing transforms applied before detection"
},
"threshold": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Anomaly probability threshold (default: 0.9)"
},
"type": {
"default": "lof",
"enum": ["lof"],
"type": "string"
},
"window": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Rolling window size — how many historical data points to train on (default: based on calculation interval)"
}
},
"type": "object"
},
{
"properties": {
"kernel": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"description": "SVM kernel type (default: \"rbf\")"
},
"nu": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Upper bound on training errors fraction (default: 0.1)"
},
"preprocessing": {
"anyOf": [
{
"properties": {
"diffs_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Order of differencing. 0 = raw values, 1 = first-order diffs (default: 0)"
},
"lags_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Number of lag features. 0 = none, >0 = include n lagged values (default: 0)"
},
"smooth_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Moving average window size. 0 = no smoothing, >1 = smooth over n points (default: 0)"
}
},
"type": "object"
},
{
"type": "null"
}
],
"description": "Preprocessing transforms applied before detection"
},
"threshold": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Anomaly probability threshold (default: 0.9)"
},
"type": {
"default": "ocsvm",
"enum": ["ocsvm"],
"type": "string"
},
"window": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Rolling window size — how many historical data points to train on (default: based on calculation interval)"
}
},
"type": "object"
},
{
"properties": {
"preprocessing": {
"anyOf": [
{
"properties": {
"diffs_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Order of differencing. 0 = raw values, 1 = first-order diffs (default: 0)"
},
"lags_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Number of lag features. 0 = none, >0 = include n lagged values (default: 0)"
},
"smooth_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Moving average window size. 0 = no smoothing, >1 = smooth over n points (default: 0)"
}
},
"type": "object"
},
{
"type": "null"
}
],
"description": "Preprocessing transforms applied before detection"
},
"threshold": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Anomaly probability threshold (default: 0.9)"
},
"type": {
"default": "pca",
"enum": ["pca"],
"type": "string"
},
"window": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Rolling window size — how many historical data points to train on (default: based on calculation interval)"
}
},
"type": "object"
}
],
"description": "Detector configuration to simulate."
},
"insight": {
"description": "Insight ID to simulate the detector on.",
"type": "number"
},
"series_index": {
"default": 0,
"description": "Zero-based index of the series to analyze (trends insights only).",
"type": "number"
}
},
"required": ["insight", "detector_config"],
"type": "object"
}