Skip to content

Managed YAML

Managed YAML is the higher-level DaisyConfig file model for versioned config ownership.

id string

Stable identifier for the managed file.

Required

path string

Disk path relative to the plugin data folder.

Required

Bundled resource path used for first-run creation and default merge.

Optional

codec object

Typed decode shape for the managed file.

Required

YAML key that stores the schema version. Defaults to config_version.

Optional

Current schema version expected by the codec.

Required

Ordered list of migrations used to reach currentVersion.

Optional

Controls whether missing keys are merged from bundled defaults.

Optional

  • DaisyManagedYamlFile<T>
  • DaisyManagedConfigHandle<T>
  • DaisyManagedConfigMetadata
  • DaisyManagedReloadResult<T>
  • DaisyManagedMigrationReport
  • DaisyYamlMergePolicy

DaisyManagedConfigMetadata exposes:

  • path
  • versionKey
  • currentVersion
  • diskVersion

Use it when you want to log the currently observed file version or expose admin diagnostics.

DaisyManagedMigrationReport records:

  • whether the file was created from defaults
  • which keys were merged
  • which keys were removed
  • which keys were renamed or moved
  • version before and after
  • whether the file was written back

DaisyYamlMergePolicy.AddMissingKeys is the default and recommended behavior.

It:

  • copies only missing deep keys
  • does not overwrite user values
  • does not remove unknown user keys

Use None only when you explicitly do not want bundled defaults merged into disk files.