Package-level declarations
Types
Where scheduled runs get their agent: implement it on your Application. Return the same backend your chat uses (e.g. harness.backend(approver)), so a scheduled task sees the user's current provider, tools and skills.
Runs one ScheduledTask with the app's agent (ScheduledAgentHost) and posts the answer as a notification. Tools that need approval are denied (nobody is there to approve). A failed run is recorded on the task and not retried, so a broken prompt cannot loop.
A prompt the agent runs later; everyMinutes null runs it once. Times are ISO 8601 instants.
Scheduled and recurring agent runs: the agent can schedule_task a prompt for later (once, or every N minutes), list_scheduled_tasks and cancel_scheduled_task. Runs happen in the background on WorkManager (ScheduledAgentWorker), survive reboots, and post their answer as a notification (if the app may post notifications).