mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-18 08:31:49 -06:00
d6b2e14f63
* feat(cron): enable automation triggers by default Condition watchers, script payloads, and stream schedules were gated behind cron.triggers.enabled=false, so the capability shipped dark and the automations tool told the model to call it unsupported. The gate did not buy what its warning implied. cronJobUsesToolRuntime treats agentTurn, script, and trigger.script identically for tool policy, and jobs are capped to the creating agent's allowlist via creatorToolAllowlist -- but an agentTurn cron job was never gated, so unattended recurring exec with that same creator-capped authority was already reachable. The gated paths are strictly tighter: a condition gate gets 30s, 5 tool calls, 16KB state and a 30s minimum interval, where an agentTurn has no such budget. Sandboxing already applies to trigger scripts, which resolve sandbox context and redirect the workspace when access is not rw. Absent config now means enabled; an explicit cron.triggers.enabled: false still disables every surface it disabled before, and the error text names the opt-out instead of telling operators to turn something on. No new config key, no migration. Docs: reword the trigger warning for default-on while keeping the unattended execution note, and record the new default in the configuration reference. * test(cron): refresh prompt snapshots for default-on triggers Trigger, stream-schedule, and script-payload surfaces are now advertised in the automations tool description by default, so the committed fixtures drift. This also records the cost: dynamicToolsJson grows 49,477 -> 52,541 chars and the snapshot total 76,861 -> 79,925 (~766 rough tokens per prompt). That is the price of no longer dark-shipping the capability. * test(mcp): expect trigger surfaces by default in the tools bridge The MCP tools bridge mirrors the scheduler gate, so an absent cron.triggers config now advertises the trigger surface. Explicit false still narrows it and explicit true still widens it; both assertions are unchanged.