runtimeoption

package
v0.7.5 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SemanticID

func SemanticID(id string) string

SemanticID canonicalizes an ACP option ID for reserved-setting conflict checks.

Types

type Selection

type Selection struct {
	ID        string `json:"id"                  yaml:"id"                   toml:"id"`
	ValueID   string `json:"value_id,omitempty"  yaml:"value_id,omitempty"   toml:"value_id,omitempty"`
	BoolValue *bool  `json:"bool_value,omitzero" yaml:"bool_value,omitempty" toml:"bool_value,omitempty"`
}

Selection is one typed provider-advertised ACP runtime option. Exactly one of ValueID or BoolValue must be set.

func CanonicalSelections

func CanonicalSelections(selections []Selection) []Selection

CanonicalSelections clones and sorts selections by ID.

func CloneSelections

func CloneSelections(selections []Selection) []Selection

CloneSelections returns an ownership-safe copy with trimmed scalar values.

func MergeSelections

func MergeSelections(base []Selection, overlay []Selection) ([]Selection, []string)

MergeSelections overlays selections by ID and reports the applied overlay IDs.

func NormalizeSelections

func NormalizeSelections(path string, selections []Selection) ([]Selection, error)

NormalizeSelections validates, copies, deduplicates, and sorts selections.

func (Selection) Normalize

func (s Selection) Normalize() (Selection, error)

Normalize validates and returns an ownership-safe canonical selection.

func (*Selection) UnmarshalYAML

func (s *Selection) UnmarshalYAML(value *yaml.Node) error

UnmarshalYAML decodes one closed, typed ACP option selection.

func (Selection) Validate

func (s Selection) Validate(path string) error

Validate checks one selection against the typed runtime contract.

Jump to

Keyboard shortcuts

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