Files
wehub-resource-sync 4b6817381b
Benchmark image — build + push to ECR (any adapter) / build + push (push) Waiting to run
CI / quality (ubuntu-latest) (push) Waiting to run
CI / test (tools-runtime) (push) Waiting to run
CI / test (e2e-general) (push) Waiting to run
CI / test (cli-runtime) (push) Waiting to run
CI / test (e2e-provider-and-openclaw) (push) Waiting to run
CI / test (integrations-and-misc) (push) Waiting to run
CI / coverage-report (push) Blocked by required conditions
CI / test-kubernetes (push) Waiting to run
CI / should-run-thorough (push) Waiting to run
CI / test-thorough (cloudwatch-demo) (push) Blocked by required conditions
CI / test-thorough (flink-ecs) (push) Blocked by required conditions
CI / test-thorough (upstream-lambda) (push) Blocked by required conditions
CI / test-thorough (prefect-ecs-fargate) (push) Blocked by required conditions
CodeQL / Analyze (python) (push) Waiting to run
Release / build-binaries (zip, opensre.exe, onefile, windows-latest, windows-x64) (push) Blocked by required conditions
Release / publish-release (push) Blocked by required conditions
Release / publish-main-release (push) Blocked by required conditions
Release / prepare (push) Waiting to run
Release / verify (push) Blocked by required conditions
Release / build-python-dist (push) Blocked by required conditions
Release / build-binaries (tar.gz, opensre, onedir, macos-15-intel, darwin-x64) (push) Blocked by required conditions
Release / build-binaries (tar.gz, opensre, onedir, macos-latest, darwin-arm64) (push) Blocked by required conditions
Release / build-binaries (tar.gz, opensre, onedir, ubuntu-22.04, linux-x64) (push) Blocked by required conditions
Release / build-binaries (tar.gz, opensre, onedir, ubuntu-22.04-arm, linux-arm64) (push) Blocked by required conditions
Synthetic Deterministic Tests / Synthetic offline (deterministic) (push) Waiting to run
Interactive Shell Live (PR + post-merge) / turn-checks (no-LLM) (push) Waiting to run
Interactive Shell Live (PR + post-merge) / turn-live shard ${{ matrix.shard_index }} (push) Waiting to run
CI (OpenClaw E2E) / openclaw test (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 13:10:45 +08:00

113 lines
4.6 KiB
Python

"""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