mirror of
https://github.com/hansjone/oclaw.git
synced 2026-10-11 07:00:48 +08:00
Skip overlapping scheduled runs and surface playbook status in job lists.
Due ticks no longer stack on an active run (WA skip notice + stale clear); schedule_list/admin/gateway now show playbook, steps_n, and last_run signals without dumping full recipes. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
51eef09801
commit
9d4dced4e4
9 changed files with 487 additions and 18 deletions
|
|
@ -319,6 +319,20 @@ def prompt_summary_from_recipe(recipe: dict[str, Any] | None, *, fallback: str =
|
|||
return str(fallback or "").strip()
|
||||
|
||||
|
||||
def recipe_list_summary(recipe: dict[str, Any] | None) -> dict[str, Any]:
|
||||
"""Compact playbook signals for schedule_list / admin tables."""
|
||||
norm = normalize_recipe(recipe or {})
|
||||
steps = list(norm.get("steps") or [])
|
||||
goal = str(norm.get("goal") or "").strip()
|
||||
playbook = bool(goal) and len(steps) >= 2
|
||||
return {
|
||||
"playbook": playbook,
|
||||
"has_recipe": not recipe_is_empty(norm),
|
||||
"steps_n": len(steps),
|
||||
"recipe_goal": goal[:240],
|
||||
}
|
||||
|
||||
|
||||
def preview_markdown(
|
||||
*,
|
||||
name: str,
|
||||
|
|
@ -602,6 +616,7 @@ __all__ = [
|
|||
"prompt_summary_from_recipe",
|
||||
"recipe_has_playbook",
|
||||
"recipe_is_empty",
|
||||
"recipe_list_summary",
|
||||
"recipe_missing_fields",
|
||||
"resolve_effective_playbook_recipe",
|
||||
"resolve_ops_recipe_template",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue