pub(crate) const SCHEDULE_TOOL: &str = r#"{
"name": "Schedule",
"description": "Inject a prompt or slash command into an agent's conversation on a schedule, usually ANOTHER agent's. Every call takes an action. create: with cron, a persistent job on a 5-field cron schedule, UTC unless tz names a time zone (\"0 9 * * 1-5\" is 9am on weekdays) that survives pane restarts as long as AgentMux runs, needing name, prompt and to; with every (\"30s\", \"5m\", \"1h\"; a bare number is minutes), a loop that lives as long as this agent's session, to defaulting to you. list: the cron jobs, each with its last run and next fire, then this session's loops. pause and resume: a cron job. delete: a cron job or a loop, by the id create returned. history: a cron job's runs, newest first, including the ones that didn't happen (missed, skipped) and why. run_now: run a cron job once now (yours, or as the operator). report: when a scheduled prompt you received ends with a run id, say how that run went: run_id, outcome ok, findings (it found something worth a look) or failed, and a one-line summary; without a report the run's outcome stays unknown. To schedule your OWN next turn with no other agent involved, prefer your harness's own scheduling tools (they add no cross-agent message overhead); use this when the target is another agent, or you need delivery AgentMux keeps across a restart.",
"inputSchema": {
"type": "object",
"properties": {
"action": { "type": "string", "enum": ["create", "list", "pause", "resume", "delete", "history", "run_now", "report"], "description": "What to do" },
"cron": { "type": "string", "description": "create: a 5-field cron expression for a persistent job (min hour dom month dow), read in tz (UTC by default). An agent job runs at most every 15 minutes" },
"tz": { "type": "string", "description": "create with cron: an IANA time zone for the expression, e.g. Europe/Berlin (default UTC). A time a daylight-saving change skips runs once, at the next valid time" },
"policy": { "type": "object", "description": "create with cron: the job policy: catch_up skip|latest, overlap skip|buffer_one|cancel_other, timeout_minutes, retries (0 to 3), group, and caps {run_usd, day_usd, messages_per_day}. Caps are on by default (Settings > Jobs: $5 a run, $20 a job a day, $50 an account a day, 24 messages a day to another agent); yours may be lower, a higher figure is clamped to the default, and only the operator raises a cap. max_turns arrives in a later version" },
"template": { "type": "object", "description": "create with cron: a job template {id, version}. Not available yet" },
"params": { "type": "object", "description": "create with cron: the template's parameters" },
"every": { "type": "string", "description": "create: an interval for a loop for this session (\"30s\", \"5m\", \"1h\")" },
"prompt": { "type": "string", "description": "create: the prompt or slash command to inject" },
"to": { "type": "string", "description": "create: the target agent, by name or uid (required with cron; default you with every). A name several agents hold is refused with the candidates" },
"name": { "type": "string", "description": "create with cron: a label for the job" },
"max_fires": { "type": "integer", "description": "create with cron: disable after this many fires" },
"max_age_secs": { "type": "integer", "description": "create with cron: disable this long after creation, a hard stop for a stuck job" },
"max_iterations": { "type": "integer", "description": "create with every: stop after this many fires (0 or omitted: no limit)" },
"immediate": { "type": "boolean", "description": "create with every: also run once now" },
"catch_up": { "type": "string", "enum": ["skip", "latest"], "description": "create with cron: when a fire finds its agent not running, skip it (default) or keep the latest one and deliver it when the agent is back" },
"id": { "type": "string", "description": "pause, resume, delete, history, run_now: a job (or, for delete, loop) id from create or list" },
"limit": { "type": "integer", "description": "history: the most runs to show (default 20)" },
"run_id": { "type": "string", "description": "report: the run id from the line that ends the scheduled prompt" },
"outcome": { "type": "string", "enum": ["ok", "findings", "failed"], "description": "report: how the run went" },
"summary": { "type": "string", "description": "report: one line, at most 300 characters" },
"links": { "type": "array", "items": { "type": "string" }, "description": "report: up to 5 links (a PR, a report file)" }
},
"required": ["action"]
}
}"#;