preset

package
v1.36.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 17, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateExtendsRefs

func ValidateExtendsRefs(intent *model.Intent) error

ValidateExtendsRefs checks that every extends ref references a declared composition source.

func ValidatePresetSpec

func ValidatePresetSpec(preset *model.IntentPreset, prov model.PresetProvenance) error

ValidatePresetSpec checks that a loaded IntentPreset does not contain forbidden fields.

Types

type MergeResult

type MergeResult struct {
	Intent     *model.Intent
	Provenance map[string][]model.PresetProvenance
}

MergeResult holds the merged intent and provenance metadata.

func MergePresets

func MergePresets(intent *model.Intent, presets []*ResolvedPreset) (*MergeResult, error)

MergePresets applies resolved presets to the intent using deterministic field-specific merge rules. Presets are applied in declaration order, then the original repo intent is overlaid on top (repo always wins for defaults).

type ResolvedPreset

type ResolvedPreset struct {
	Preset     model.IntentPreset
	Provenance model.PresetProvenance
}

ResolvedPreset pairs a parsed IntentPreset with its provenance.

func LoadPresetsForIntent

func LoadPresetsForIntent(intent *model.Intent, sourceRoots map[string]string) ([]*ResolvedPreset, error)

LoadPresetsForIntent resolves each extends ref against the already-resolved composition source directories and returns parsed presets in declaration order.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL