2026-07-05 17:09:20 +02:00
|
|
|
"""Attention and NextAction — thin Data Layer wrapper (AP1.0)."""
|
2026-07-05 15:11:15 +02:00
|
|
|
|
|
|
|
|
from __future__ import annotations
|
|
|
|
|
|
2026-07-05 17:09:20 +02:00
|
|
|
from steering.signals.engine import evaluate
|
2026-07-05 15:11:15 +02:00
|
|
|
from tenant_context import TenantContext
|
|
|
|
|
|
|
|
|
|
|
2026-07-05 17:09:20 +02:00
|
|
|
def get_attention_items(ctx: TenantContext):
|
|
|
|
|
return evaluate(ctx, kind="attention")
|
2026-07-05 15:11:15 +02:00
|
|
|
|
|
|
|
|
|
2026-07-05 17:09:20 +02:00
|
|
|
def get_next_action_candidates(ctx: TenantContext, *, limit: int = 10):
|
|
|
|
|
return evaluate(ctx, kind="next_action", limit=limit)
|
2026-07-05 15:55:05 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
def get_next_action_candidates_for_initiative(
|
|
|
|
|
ctx: TenantContext, *, initiative_id: str, limit: int = 5
|
2026-07-05 17:09:20 +02:00
|
|
|
):
|
|
|
|
|
return evaluate(
|
|
|
|
|
ctx,
|
|
|
|
|
kind="next_action",
|
|
|
|
|
limit=limit,
|
|
|
|
|
initiative_id=initiative_id,
|
|
|
|
|
)
|