chore: import upstream snapshot with attribution
CI (OpenClaw E2E) / openclaw test (push) Has been cancelled
CI / coverage-report (push) Has been cancelled
CI / test-kubernetes (push) Has been cancelled
CI / should-run-thorough (push) Has been cancelled
CI / test-thorough (cloudwatch-demo) (push) Has been cancelled
CI / test-thorough (flink-ecs) (push) Has been cancelled
CI / test-thorough (upstream-lambda) (push) Has been cancelled
CI / test-thorough (prefect-ecs-fargate) (push) Has been cancelled
Release / build-binaries (zip, opensre.exe, onefile, windows-latest, windows-x64) (push) Has been cancelled
Benchmark image — build + push to ECR (any adapter) / build + push (push) Has been cancelled
CI / quality (ubuntu-latest) (push) Has been cancelled
CI / test (tools-runtime) (push) Has been cancelled
CI / test (e2e-general) (push) Has been cancelled
CI / test (cli-runtime) (push) Has been cancelled
CI / test (e2e-provider-and-openclaw) (push) Has been cancelled
CI / test (integrations-and-misc) (push) Has been cancelled
Release / verify (push) Has been cancelled
Release / build-python-dist (push) Has been cancelled
Release / build-binaries (tar.gz, opensre, onedir, macos-15-intel, darwin-x64) (push) Has been cancelled
Release / build-binaries (tar.gz, opensre, onedir, macos-latest, darwin-arm64) (push) Has been cancelled
Release / build-binaries (tar.gz, opensre, onedir, ubuntu-22.04, linux-x64) (push) Has been cancelled
Release / publish-release (push) Has been cancelled
Release / publish-main-release (push) Has been cancelled
Interactive Shell Live (PR + post-merge) / turn-checks (no-LLM) (push) Has been cancelled
CodeQL / Analyze (python) (push) Has been cancelled
Interactive Shell Live (PR + post-merge) / turn-live shard ${{ matrix.shard_index }} (push) Has been cancelled
Release / prepare (push) Has been cancelled
Release / build-binaries (tar.gz, opensre, onedir, ubuntu-22.04-arm, linux-arm64) (push) Has been cancelled
Synthetic Deterministic Tests / Synthetic offline (deterministic) (push) Has been cancelled
CI (OpenClaw E2E) / openclaw test (push) Has been cancelled
CI / coverage-report (push) Has been cancelled
CI / test-kubernetes (push) Has been cancelled
CI / should-run-thorough (push) Has been cancelled
CI / test-thorough (cloudwatch-demo) (push) Has been cancelled
CI / test-thorough (flink-ecs) (push) Has been cancelled
CI / test-thorough (upstream-lambda) (push) Has been cancelled
CI / test-thorough (prefect-ecs-fargate) (push) Has been cancelled
Release / build-binaries (zip, opensre.exe, onefile, windows-latest, windows-x64) (push) Has been cancelled
Benchmark image — build + push to ECR (any adapter) / build + push (push) Has been cancelled
CI / quality (ubuntu-latest) (push) Has been cancelled
CI / test (tools-runtime) (push) Has been cancelled
CI / test (e2e-general) (push) Has been cancelled
CI / test (cli-runtime) (push) Has been cancelled
CI / test (e2e-provider-and-openclaw) (push) Has been cancelled
CI / test (integrations-and-misc) (push) Has been cancelled
Release / verify (push) Has been cancelled
Release / build-python-dist (push) Has been cancelled
Release / build-binaries (tar.gz, opensre, onedir, macos-15-intel, darwin-x64) (push) Has been cancelled
Release / build-binaries (tar.gz, opensre, onedir, macos-latest, darwin-arm64) (push) Has been cancelled
Release / build-binaries (tar.gz, opensre, onedir, ubuntu-22.04, linux-x64) (push) Has been cancelled
Release / publish-release (push) Has been cancelled
Release / publish-main-release (push) Has been cancelled
Interactive Shell Live (PR + post-merge) / turn-checks (no-LLM) (push) Has been cancelled
CodeQL / Analyze (python) (push) Has been cancelled
Interactive Shell Live (PR + post-merge) / turn-live shard ${{ matrix.shard_index }} (push) Has been cancelled
Release / prepare (push) Has been cancelled
Release / build-binaries (tar.gz, opensre, onedir, ubuntu-22.04-arm, linux-arm64) (push) Has been cancelled
Synthetic Deterministic Tests / Synthetic offline (deterministic) (push) Has been cancelled
This commit is contained in:
@@ -0,0 +1,112 @@
|
||||
"""Strict models for resolved effective integrations."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import re
|
||||
from typing import Any
|
||||
|
||||
from pydantic import Field, field_validator
|
||||
|
||||
from config.strict_config import StrictConfigModel
|
||||
|
||||
|
||||
class IntegrationInstance(StrictConfigModel):
|
||||
"""One named instance of a provider."""
|
||||
|
||||
name: str = "default"
|
||||
tags: dict[str, str] = Field(default_factory=dict)
|
||||
credentials: dict[str, Any] = Field(default_factory=dict)
|
||||
|
||||
@field_validator("name", mode="before")
|
||||
@classmethod
|
||||
def _normalize_name(cls, value: object) -> str:
|
||||
text = str(value or "default").strip().lower()
|
||||
return text or "default"
|
||||
|
||||
@field_validator("tags", mode="before")
|
||||
@classmethod
|
||||
def _normalize_tags(cls, value: object) -> dict[str, str]:
|
||||
if not isinstance(value, dict):
|
||||
return {}
|
||||
normalized: dict[str, str] = {}
|
||||
for key, value_text in value.items():
|
||||
normalized_key = str(key).strip().lower()
|
||||
normalized_value = str(value_text).strip().lower()
|
||||
if (
|
||||
normalized_key
|
||||
and normalized_value
|
||||
and re.match(r"^[a-z][a-z0-9_-]*$", normalized_key)
|
||||
):
|
||||
normalized[normalized_key] = normalized_value
|
||||
return normalized
|
||||
|
||||
|
||||
class EffectiveIntegrationEntry(StrictConfigModel):
|
||||
"""Resolved integration entry with source metadata."""
|
||||
|
||||
source: str
|
||||
config: dict[str, Any]
|
||||
instances: list[dict[str, Any]] | None = None
|
||||
|
||||
|
||||
class EffectiveIntegrations(StrictConfigModel):
|
||||
"""Strict container for normalized effective integrations."""
|
||||
|
||||
grafana: EffectiveIntegrationEntry | None = None
|
||||
datadog: EffectiveIntegrationEntry | None = None
|
||||
groundcover: EffectiveIntegrationEntry | None = None
|
||||
honeycomb: EffectiveIntegrationEntry | None = None
|
||||
coralogix: EffectiveIntegrationEntry | None = None
|
||||
dagster: EffectiveIntegrationEntry | None = None
|
||||
aws: EffectiveIntegrationEntry | None = None
|
||||
slack: EffectiveIntegrationEntry | None = None
|
||||
tracer: EffectiveIntegrationEntry | None = None
|
||||
github: EffectiveIntegrationEntry | None = None
|
||||
sentry: EffectiveIntegrationEntry | None = None
|
||||
mongodb: EffectiveIntegrationEntry | None = None
|
||||
mongodb_atlas: EffectiveIntegrationEntry | None = None
|
||||
redis: EffectiveIntegrationEntry | None = None
|
||||
mariadb: EffectiveIntegrationEntry | None = None
|
||||
rabbitmq: EffectiveIntegrationEntry | None = None
|
||||
betterstack: EffectiveIntegrationEntry | None = None
|
||||
google_docs: EffectiveIntegrationEntry | None = None
|
||||
gitlab: EffectiveIntegrationEntry | None = None
|
||||
vercel: EffectiveIntegrationEntry | None = None
|
||||
jira: EffectiveIntegrationEntry | None = None
|
||||
opsgenie: EffectiveIntegrationEntry | None = None
|
||||
pagerduty: EffectiveIntegrationEntry | None = None
|
||||
incident_io: EffectiveIntegrationEntry | None = None
|
||||
notion: EffectiveIntegrationEntry | None = None
|
||||
prefect: EffectiveIntegrationEntry | None = None
|
||||
posthog: EffectiveIntegrationEntry | None = None
|
||||
kafka: EffectiveIntegrationEntry | None = None
|
||||
clickhouse: EffectiveIntegrationEntry | None = None
|
||||
postgresql: EffectiveIntegrationEntry | None = None
|
||||
azure_sql: EffectiveIntegrationEntry | None = None
|
||||
bitbucket: EffectiveIntegrationEntry | None = None
|
||||
trello: EffectiveIntegrationEntry | None = None
|
||||
discord: EffectiveIntegrationEntry | None = None
|
||||
telegram: EffectiveIntegrationEntry | None = None
|
||||
smtp: EffectiveIntegrationEntry | None = None
|
||||
whatsapp: EffectiveIntegrationEntry | None = None
|
||||
twilio: EffectiveIntegrationEntry | None = None
|
||||
openclaw: EffectiveIntegrationEntry | None = None
|
||||
posthog_mcp: EffectiveIntegrationEntry | None = None
|
||||
sentry_mcp: EffectiveIntegrationEntry | None = None
|
||||
x_mcp: EffectiveIntegrationEntry | None = None
|
||||
mysql: EffectiveIntegrationEntry | None = None
|
||||
snowflake: EffectiveIntegrationEntry | None = None
|
||||
azure: EffectiveIntegrationEntry | None = None
|
||||
openobserve: EffectiveIntegrationEntry | None = None
|
||||
opensearch: EffectiveIntegrationEntry | None = None
|
||||
alertmanager: EffectiveIntegrationEntry | None = None
|
||||
splunk: EffectiveIntegrationEntry | None = None
|
||||
airflow: dict[str, Any] | None = None
|
||||
argocd: EffectiveIntegrationEntry | None = None
|
||||
helm: EffectiveIntegrationEntry | None = None
|
||||
victoria_logs: EffectiveIntegrationEntry | None = None
|
||||
alicloud: EffectiveIntegrationEntry | None = None
|
||||
signoz: EffectiveIntegrationEntry | None = None
|
||||
jenkins: EffectiveIntegrationEntry | None = None
|
||||
tempo: EffectiveIntegrationEntry | None = None
|
||||
temporal: EffectiveIntegrationEntry | None = None
|
||||
Reference in New Issue
Block a user