Schedules on a computer: which one, its folder and mode, and "not linked now"
CI / check (push) Canceled after 0s
CI / check (push) Canceled after 0s
`runs_on` (server 57d06ee): the schedule page says Computer: name · folder · mode; each run row names the computer, and a run waiting with error class device_away adds "not linked now" (server's words). The fixtures carry no "does not accept scheduled work" state on /api/v2, so that one is the run's own error text only. ScheduleContractTest reads schedule_on_device.json; shot 10-schedule-on-computer. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
16 files changed
+141
-2
No files matched your search
@@ -102,6 +102,8 @@ data class Schedule(
|
||||
@SerialName("failure_streak") val failureStreak: Int = 0,
|
||||
/** Monitor mode: what the schedule watches; the model runs only when it changed. */
|
||||
val watch: ScheduleWatch? = null,
|
||||
/** The linked computer it runs on, as an agent chat there; null: on the server. */
|
||||
@SerialName("runs_on") val runsOn: RunsOn? = null,
|
||||
@SerialName("last_error") val lastError: String? = null,
|
||||
@SerialName("last_run") val lastRun: ScheduleRun? = null,
|
||||
val running: Boolean = false,
|
||||
@@ -205,3 +207,20 @@ data class RunNotification(
|
||||
val labels: Map<String, String> = emptyMap(),
|
||||
val ask: String = "",
|
||||
)
|
||||
|
||||
/**
|
||||
* Where a schedule runs when not on the server (harness spec 3.5.0): a linked computer
|
||||
* ([deviceName]), the folder there, the agent mode (never wider than Edit unless chosen), and how
|
||||
* long an approval it needs waits on the phone.
|
||||
*/
|
||||
@Serializable
|
||||
data class RunsOn(
|
||||
val device: String = "",
|
||||
@SerialName("device_name") val deviceName: String = "",
|
||||
val cwd: String = "",
|
||||
val mode: String = "",
|
||||
@SerialName("approval_wait_minutes") val approvalWaitMinutes: Int? = null,
|
||||
)
|
||||
|
||||
/** A run that waits because its computer is not linked (`error.class` `device_away`). */
|
||||
val ScheduleRun.computerAway: Boolean get() = error?.kind == "device_away"
|
||||
Reference in new issue
Block a user