11// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22
3- import * as Shared from './shared' ;
4-
53/**
64 * Configuration for automatic Devbox behavior after idle time.
75 *
@@ -278,7 +276,7 @@ export interface LaunchParameters {
278276 * must match), resume triggers via lifecycle.resume_triggers, and optional
279277 * lifecycle hooks via lifecycle.lifecycle_hooks.
280278 */
281- lifecycle ?: LaunchParameters . Lifecycle | null ;
279+ lifecycle ?: LifecycleConfiguration | null ;
282280
283281 /**
284282 * (Optional) ID of the network policy to apply to Devboxes launched with these
@@ -319,69 +317,6 @@ export interface LaunchParameters {
319317}
320318
321319export namespace LaunchParameters {
322- /**
323- * Lifecycle configuration for idle and resume behavior. Configure idle policy via
324- * lifecycle.after_idle (if both this and the top-level after_idle are set, they
325- * must match), resume triggers via lifecycle.resume_triggers, and optional
326- * lifecycle hooks via lifecycle.lifecycle_hooks.
327- */
328- export interface Lifecycle {
329- /**
330- * Configure Devbox lifecycle based on idle activity. If both this and the
331- * top-level after_idle are set, they must have the same value. Prefer this field
332- * for new integrations.
333- */
334- after_idle ?: Shared . AfterIdle | null ;
335-
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-
342- /**
343- * Triggers that can resume a suspended Devbox.
344- */
345- resume_triggers ?: Lifecycle . ResumeTriggers | null ;
346- }
347-
348- 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-
369- /**
370- * Triggers that can resume a suspended Devbox.
371- */
372- export interface ResumeTriggers {
373- /**
374- * When true, axon events targeting a suspended Devbox will trigger a resume.
375- */
376- axon_event ?: boolean | null ;
377-
378- /**
379- * When true, HTTP traffic to a suspended Devbox via tunnel will trigger a resume.
380- */
381- http ?: boolean | null ;
382- }
383- }
384-
385320 /**
386321 * Specify the user for execution on Devbox. If not set, default `user` will be
387322 * used.
@@ -399,6 +334,58 @@ export namespace LaunchParameters {
399334 }
400335}
401336
337+ /**
338+ * Lifecycle configuration for Devbox idle and resume behavior. Configure idle
339+ * policy via after_idle, resume triggers via resume_triggers, and optional
340+ * lifecycle hooks via lifecycle_hooks.
341+ */
342+ export interface LifecycleConfiguration {
343+ /**
344+ * Configure Devbox lifecycle based on idle activity. If both this and the
345+ * top-level after_idle are set, they must have the same value. Prefer this field
346+ * for new integrations.
347+ */
348+ after_idle ?: AfterIdle | null ;
349+
350+ /**
351+ * Optional lifecycle hooks. suspend_commands run through the suspend path before
352+ * the Devbox suspends; see launch_commands for work on every startup.
353+ */
354+ lifecycle_hooks ?: LifecycleHooks | null ;
355+
356+ /**
357+ * Triggers that can resume a suspended Devbox.
358+ */
359+ resume_triggers ?: ResumeTriggers | null ;
360+ }
361+
362+ /**
363+ * Lifecycle hooks for Devbox suspend. suspend_commands run sequentially as the
364+ * configured Devbox user through the rage/vmagent suspend path before the Devbox
365+ * suspends; failures are logged but do not block suspending. The
366+ * suspend_deadline_ms budget defaults to 30000 ms, may not exceed 60000 ms, and
367+ * covers broker drain plus suspend_commands. If the deadline is exceeded, suspend
368+ * work is abandoned, the timeout is logged, and the Devbox still proceeds to
369+ * suspend by shutting down vmagent and killing the VM. Resume hooks and resume
370+ * deadline settings are persistence/internal only and hidden from the public API
371+ * reference. launch_commands still run on every startup, including after resume.
372+ */
373+ export interface LifecycleHooks {
374+ /**
375+ * Commands to run through the suspend path before the Devbox suspends (e.g.
376+ * cleanup, quiesce daemons).
377+ */
378+ suspend_commands ?: Array < string > | null ;
379+
380+ /**
381+ * Deadline in milliseconds for broker drain and suspend_commands during suspend.
382+ * Defaults to 30000 ms and may not exceed 60000 ms. If exceeded, suspend work is
383+ * abandoned, the timeout is logged, and the Devbox still proceeds to suspend by
384+ * shutting down vmagent and killing the VM.
385+ */
386+ suspend_deadline_ms ?: number | null ;
387+ }
388+
402389/**
403390 * Mount configuration for attaching files, agents, or code to a Devbox.
404391 *
@@ -468,6 +455,21 @@ export interface ObjectMount {
468455 type : 'object_mount' ;
469456}
470457
458+ /**
459+ * Triggers that can resume a suspended Devbox.
460+ */
461+ export interface ResumeTriggers {
462+ /**
463+ * When true, axon events targeting a suspended Devbox will trigger a resume.
464+ */
465+ axon_event ?: boolean | null ;
466+
467+ /**
468+ * When true, HTTP traffic to a suspended Devbox via tunnel will trigger a resume.
469+ */
470+ http ?: boolean | null ;
471+ }
472+
471473/**
472474 * Configuration profile for scenario/benchmark runs.
473475 *
0 commit comments