mirror of
https://github.com/hansjone/oclaw.git
synced 2026-10-09 00:40:45 +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
|
|
@ -2376,6 +2376,7 @@ def build_admin_router() -> APIRouter:
|
|||
if delivery is None:
|
||||
wa_chat = str((payload.get("whatsapp") or {}).get("chat_id") if isinstance(payload.get("whatsapp"), dict) else payload.get("whatsapp_chat_id") or "")
|
||||
delivery = build_default_delivery(store=store, tenant_id=tenant_id, whatsapp_chat_id=wa_chat)
|
||||
recipe = payload.get("recipe") if isinstance(payload.get("recipe"), dict) else None
|
||||
row = store.scheduled_job_create(
|
||||
tenant_id=tenant_id,
|
||||
name=name,
|
||||
|
|
@ -2388,6 +2389,7 @@ def build_admin_router() -> APIRouter:
|
|||
specialist=normalize_requested_specialist(payload.get("specialist") or "generalist"),
|
||||
lang=str(payload.get("lang") or "zh"),
|
||||
delivery=delivery,
|
||||
recipe=recipe,
|
||||
source_session_id=str(payload.get("source_session_id") or "").strip() or None,
|
||||
created_by_user_id=str(ctx.get("user_id") or ""),
|
||||
source="admin",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue