mirror of
https://github.com/hansjone/oclaw.git
synced 2026-10-09 03:30:48 +08:00
feat(scheduler): workflow recipes with confirm-before-create
Store self-contained playbook recipes on scheduled jobs, add schedule_propose draft gate, and run playbook instructions at fire time instead of only short reminders. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
ad5d1db3c6
commit
d036190195
10 changed files with 989 additions and 49 deletions
|
|
@ -286,9 +286,16 @@ def _worker_loop(*, store: Any, worker_id: str, poll_interval_s: float) -> None:
|
|||
if not system_prompt:
|
||||
system_prompt = str(getattr(executor, "system_prompt", "") or "")
|
||||
if is_scheduled_turn:
|
||||
from runtime.scheduler.recipe import recipe_has_playbook
|
||||
from runtime.scheduler.turn_text import scheduled_turn_system_suffix
|
||||
|
||||
system_prompt = str(system_prompt or "") + scheduled_turn_system_suffix(lang=lang)
|
||||
playbook = bool((metadata or {}).get("scheduled_playbook")) or recipe_has_playbook(
|
||||
payload.get("recipe") if isinstance(payload.get("recipe"), dict) else None
|
||||
)
|
||||
system_prompt = str(system_prompt or "") + scheduled_turn_system_suffix(
|
||||
lang=lang,
|
||||
playbook=playbook,
|
||||
)
|
||||
|
||||
max_messages = int(store.get_setting("AIA_TURN_MAX_CONTEXT_MESSAGES") or 80)
|
||||
max_tool_rounds = int(store.get_setting("AIA_TURN_MAX_TOOL_ROUNDS") or 100)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue