pub struct ScheduleTaskParams {
pub task: String,
pub interval: String,
pub runs: Option<u64>,
pub kind: Option<String>,
pub target: Option<String>,
}Expand description
Args for the browser schedule_task tool (src/app/chat/tools/misc.rs)
— off-chain job creation. kind’s enum constrains the MODEL only; the
body’s == Some("agent") classification (anything else = reminder)
stays unchanged.
Fields§
§task: StringWhat to do each fire. For a REMINDER, the note to push you. For an AGENT job, a self-contained prompt. Prefix with “GOAL: “ for a goal-loop that ends early once done.
interval: StringDelay / cadence: “60s”, “15m”, “1h” (a bare number = seconds; minimum 60s). For a ONE-SHOT (“in 15 minutes”) set this to the delay and runs to 1.
runs: Option<u64>How many times to fire (default 1 — a single delayed task). Higher = a recurring job.
kind: Option<String>“reminder” (default) = just push you the task text (free, no agent run, no $LH). “agent” = run an agent each fire (bills your meter per run).
target: Option<String>AGENT jobs only: the subdomain to run each fire (defaults to THIS agent). Ignored for a reminder.
Implementations§
Source§impl ScheduleTaskParams
impl ScheduleTaskParams
Sourcepub fn schema() -> Value
pub fn schema() -> Value
Wire input_schema, generated from the SAME table as the struct
fields. Single type per property, no unions / oneOf /
additionalProperties — Gemini-safe by construction.
Sourcepub fn lenient(args: &Value) -> Self
pub fn lenient(args: &Value) -> Self
Lenient extraction: a missing or wrong-typed field falls back
to its default ("" / None / 0) instead of erroring — the
browser chat tools’ historical .get().and_then().unwrap_or()
semantics, preserved exactly (validation stays in the tool body).
req_u64 fields extract to None here; the error fires at
their generated accessor, matching the old inline ok_or_else.