All checks were successful
Deploy Development / deploy (push) Successful in 44s
Test Suite / pytest-backend (push) Successful in 1m19s
Test Suite / lint-backend (push) Successful in 2s
Test Suite / compose-smoke (push) Has been skipped
Test Suite / k6 /api/health Baseline (push) Successful in 18s
Test Suite / playwright-smoke (push) Successful in 11s
Persistierter Standard Lifecycle pro Initiative, backend/steering/ Skeleton, Attention-Refactor und Hook-Dispatch als Basis für Method Registry. Co-authored-by: Cursor <cursoragent@cursor.com>
27 lines
755 B
Python
27 lines
755 B
Python
"""Signal Engine — delegates to default rule provider (AP1.0)."""
|
|
|
|
from __future__ import annotations
|
|
|
|
from typing import Any, Literal
|
|
|
|
from steering.signals import default_rules
|
|
from tenant_context import TenantContext
|
|
|
|
SignalKind = Literal["attention", "next_action"]
|
|
|
|
|
|
def evaluate(
|
|
ctx: TenantContext,
|
|
kind: SignalKind = "attention",
|
|
*,
|
|
limit: int = 10,
|
|
initiative_id: str | None = None,
|
|
) -> list[dict[str, Any]]:
|
|
if kind == "attention":
|
|
return default_rules.get_attention_items(ctx)
|
|
if initiative_id:
|
|
return default_rules.get_next_action_candidates_for_initiative(
|
|
ctx, initiative_id=initiative_id, limit=limit
|
|
)
|
|
return default_rules.get_next_action_candidates(ctx, limit=limit)
|