@@ -275,7 +275,8 @@ export interface LaunchParameters {
275275 /**
276276 * Lifecycle configuration for idle and resume behavior. Configure idle policy via
277277 * lifecycle.after_idle (if both this and the top-level after_idle are set, they
278- * must match) and resume triggers via lifecycle.resume_triggers.
278+ * must match), resume triggers via lifecycle.resume_triggers, and optional
279+ * lifecycle hooks via lifecycle.lifecycle_hooks.
279280 */
280281 lifecycle ?: LaunchParameters . Lifecycle | null ;
281282
@@ -321,7 +322,8 @@ export namespace LaunchParameters {
321322 /**
322323 * Lifecycle configuration for idle and resume behavior. Configure idle policy via
323324 * lifecycle.after_idle (if both this and the top-level after_idle are set, they
324- * must match) and resume triggers via lifecycle.resume_triggers.
325+ * must match), resume triggers via lifecycle.resume_triggers, and optional
326+ * lifecycle hooks via lifecycle.lifecycle_hooks.
325327 */
326328 export interface Lifecycle {
327329 /**
@@ -331,13 +333,39 @@ export namespace LaunchParameters {
331333 */
332334 after_idle ?: Shared . AfterIdle | null ;
333335
336+ /**
337+ * Optional lifecycle hooks. suspend_commands run through the suspend path before
338+ * the Devbox suspends; see launch_commands for work on every startup.
339+ */
340+ lifecycle_hooks ?: Lifecycle . LifecycleHooks | null ;
341+
334342 /**
335343 * Triggers that can resume a suspended Devbox.
336344 */
337345 resume_triggers ?: Lifecycle . ResumeTriggers | null ;
338346 }
339347
340348 export namespace Lifecycle {
349+ /**
350+ * Optional lifecycle hooks. suspend_commands run through the suspend path before
351+ * the Devbox suspends; see launch_commands for work on every startup.
352+ */
353+ export interface LifecycleHooks {
354+ /**
355+ * Commands to run through the suspend path before the Devbox suspends (e.g.
356+ * cleanup, quiesce daemons).
357+ */
358+ suspend_commands ?: Array < string > | null ;
359+
360+ /**
361+ * Deadline in milliseconds for broker drain and suspend_commands during suspend.
362+ * Defaults to 30000 ms and may not exceed 60000 ms. If exceeded, suspend work is
363+ * abandoned, the timeout is logged, and the Devbox still proceeds to suspend by
364+ * shutting down vmagent and killing the VM.
365+ */
366+ suspend_deadline_ms ?: number | null ;
367+ }
368+
341369 /**
342370 * Triggers that can resume a suspended Devbox.
343371 */
0 commit comments