Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var CategoryNames = map[string]string{
"inspector": "Inspector",
"validation": "Validation",
"serialization": "Serialization",
"animation": "Animation",
}
CategoryNames maps a machine category key to its human-readable label.
var CategoryOrder = []string{"inspector", "validation", "serialization", "animation"}
CategoryOrder defines the stable display order for asset categories.
Functions ¶
func ConfigFilePath ¶
func ConfigFilePath() string
ConfigFilePath returns the full path to asset-config.json under the user's home directory. Initialised once on first call.
Types ¶
type AssetConfig ¶
type AssetConfig struct {
Version string `json:"version"`
Assets []AssetEntry `json:"assets"`
LoopEngineeringMode LoopEngineeringMode `json:"loopEngineeringMode"`
// JuicyMode mirrors ui_juicy_mode in the shared asset-config.json. When on,
// the connector's manage_ui attaches Game Feel & Juice Bible + UI Feedback Design Guide juice guidance to its
// create responses. The Hera Settings window is the primary editor.
JuicyMode bool `json:"ui_juicy_mode"`
// DefaultCscPath/DefaultDotnetPath are written by the Hera Settings window.
// The CLI doesn't edit them, but it must round-trip them so a CLI-side Save
// (e.g. toggling an asset or juicy mode) doesn't drop a user's compiler paths.
DefaultCscPath string `json:"defaultCscPath,omitempty"`
DefaultDotnetPath string `json:"defaultDotnetPath,omitempty"`
}
AssetConfig holds the full configuration.
func Load ¶
func Load() (*AssetConfig, error)
Load reads the asset config from disk. Returns defaults if file doesn't exist.
func SetAssetEnabled ¶
func SetAssetEnabled(id string, enabled bool) (*AssetConfig, error)
SetAssetEnabled sets the enabled state of an asset by ID.
func SetJuicyMode ¶ added in v0.0.17
func SetJuicyMode(enabled bool) (*AssetConfig, error)
SetJuicyMode sets the UI Juicy Mode flag and persists it.
func SetLoopEngineeringMode ¶ added in v0.0.30
func SetLoopEngineeringMode(mode LoopEngineeringMode) (*AssetConfig, error)
SetLoopEngineeringMode sets the Ultra Hera verification mode and persists it.
func ToggleAsset ¶
func ToggleAsset(id string) (*AssetConfig, error)
ToggleAsset flips the enabled state of an asset by ID.
type AssetEntry ¶
type AssetEntry struct {
ID string `json:"id"`
Name string `json:"name"`
Enabled bool `json:"enabled"`
Installed bool `json:"installed"`
Category string `json:"category"`
Description string `json:"description"`
DocURL string `json:"doc_url,omitempty"`
ReferencePath string `json:"reference_path,omitempty"`
}
AssetEntry represents a single asset plugin entry.
func DefaultAssets ¶
func DefaultAssets() []AssetEntry
DefaultAssets returns the built-in list of known asset plugins.
func GetEnabledAssets ¶
func GetEnabledAssets() ([]AssetEntry, error)
GetEnabledAssets returns all enabled asset entries.
type LoopEngineeringMode ¶ added in v0.0.30
type LoopEngineeringMode string
LoopEngineeringMode controls the Ultra Hera agent verification guidance.
const ( LoopEngineeringOff LoopEngineeringMode = "off" LoopEngineeringLight LoopEngineeringMode = "light" LoopEngineeringUltra LoopEngineeringMode = "ultra" )
func LoadLoopEngineeringModeNoCreate ¶ added in v0.0.30
func LoadLoopEngineeringModeNoCreate() LoopEngineeringMode
LoadLoopEngineeringModeNoCreate reads only Ultra Hera mode for agent-rules generation. Missing or unreadable config returns the default without writing.
func NormalizeLoopEngineeringMode ¶ added in v0.0.30
func NormalizeLoopEngineeringMode(mode string) LoopEngineeringMode
NormalizeLoopEngineeringMode accepts persisted/user-provided mode text and falls back to Light, the product default.