Some checks failed
Deploy Development / deploy (push) Successful in 48s
Test Suite / pytest-backend (push) Failing after 3m33s
Test Suite / k6 /api/health Baseline (push) Has been skipped
Test Suite / playwright-smoke (push) Has been skipped
Test Suite / lint-backend (push) Successful in 2s
Test Suite / compose-smoke (push) Has been skipped
evaluate_steering() vereinheitlicht Horizon, Next Work und Attention; Snapshot und Signal Engine delegieren dorthin; slot_map deklarativ fuer sequential_dependency und generic_operating. Co-authored-by: Cursor <cursoragent@cursor.com>
43 lines
1.1 KiB
Python
43 lines
1.1 KiB
Python
"""Event ingress stub — dual trigger (Plan | Event) v0.1."""
|
|
|
|
from __future__ import annotations
|
|
|
|
from typing import Any, Literal
|
|
|
|
from tenant_context import TenantContext
|
|
|
|
EventKind = Literal[
|
|
"actor_result",
|
|
"external_event",
|
|
"cadence_due",
|
|
"situational",
|
|
]
|
|
|
|
|
|
def apply_steering_event(
|
|
ctx: TenantContext,
|
|
*,
|
|
initiative_id: str,
|
|
event_kind: EventKind,
|
|
payload: dict[str, Any] | None = None,
|
|
) -> dict[str, Any]:
|
|
"""
|
|
Event-Schub in den Kernel (Stub v0.1).
|
|
|
|
Plan-dominante Methoden: Event wird protokolliert, Auswertung erfolgt
|
|
weiterhin über evaluate_steering (Plan-Zug). Volle Event-Pipeline folgt
|
|
für dispute_procedure, care_navigation, recurring_control.
|
|
"""
|
|
from steering.kernel.evaluate import evaluate_steering
|
|
|
|
evaluation = evaluate_steering(ctx, initiative_id=initiative_id)
|
|
return {
|
|
"accepted": True,
|
|
"event_kind": event_kind,
|
|
"initiative_id": initiative_id,
|
|
"handled": False,
|
|
"message": "Event ingress stub — re-evaluate via Plan-Zug",
|
|
"payload_keys": sorted((payload or {}).keys()),
|
|
"evaluation": evaluation.to_dict(),
|
|
}
|