core: Policy, Pflege-Agent (HITL), Healer, Lifecycle-Pipeline, Graduierung + Konfiguration

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-12 00:43:26 +02:00
co-authored by Claude Opus 5.5
parent f79e2a8556
commit f2da893f71
28 changed files with 2179 additions and 10 deletions
+6 -2
View File
@@ -91,6 +91,9 @@ slot_state = Table(
Column("status", String(20)),
Column("effective_context", Integer),
Column("base_model", String(200)),
Column("canary_model", String(200)),
Column("canary_share", Float),
Column("canary_cluster", String(200)),
Column("reason", Text),
Column("set_by", String(50)),
Column("updated_at", Float),
@@ -223,9 +226,10 @@ class Store:
return [dict(r._mapping) for r in conn.execute(q)]
# --- Ereignisse ------------------------------------------------------------------------
def add_event(self, kind: str, subject: str | None = None, data: dict | None = None) -> None:
def add_event(self, kind: str, subject: str | None = None, data: dict | None = None,
ts: float | None = None) -> None:
with self.engine.begin() as conn:
conn.execute(insert(events).values(ts=now(), kind=kind, subject=subject, data=data or {}))
conn.execute(insert(events).values(ts=ts or now(), kind=kind, subject=subject, data=data or {}))
def count_events(self, kind: str, *, subject: str | None = None, since: float | None = None) -> int:
q = select(func.count()).select_from(events).where(events.c.kind == kind)