# VM Lifecycle and Persistence Management
#
# Hybrid pattern: defaults + makers + instances

let contracts_lib = import "./contracts.ncl" in
let defaults_lib = import "./defaults.ncl" in

{
  defaults = defaults_lib,

  # Maker functions (not exported)
  make_vm_persistence | not_exported = fun overrides =>
    defaults_lib.VmPersistence & overrides,

  make_lifecycle_policy | not_exported = fun overrides =>
    defaults_lib.VmLifecyclePolicy & overrides,

  make_cleanup_schedule | not_exported = fun overrides =>
    defaults_lib.VmCleanupSchedule & overrides,

  make_recovery_state | not_exported = fun overrides =>
    defaults_lib.VmRecoveryState & overrides,

  make_auto_start_config | not_exported = fun overrides =>
    defaults_lib.VmAutoStartConfig & overrides,

  make_cleanup_policy | not_exported = fun overrides =>
    defaults_lib.VmCleanupPolicy & overrides,

  make_state_snapshot | not_exported = fun overrides =>
    defaults_lib.VmStateSnapshot & overrides,

  # Default instances
  DefaultVmPersistence = defaults_lib.VmPersistence,
  DefaultVmLifecyclePolicy = defaults_lib.VmLifecyclePolicy,
  DefaultVmCleanupSchedule = defaults_lib.VmCleanupSchedule,
  DefaultVmRecoveryState = defaults_lib.VmRecoveryState,
  DefaultVmAutoStartConfig = defaults_lib.VmAutoStartConfig,
  DefaultVmCleanupPolicy = defaults_lib.VmCleanupPolicy,
  DefaultVmStateSnapshot = defaults_lib.VmStateSnapshot,
}
