Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultDir ¶
func DefaultDir() string
DefaultDir returns the default configuration directory (~/.skael).
func WriteConfig ¶
WriteConfig creates dir if needed and writes cfg to config.json with mode 0600.
func WriteState ¶
WriteState writes state.json atomically (temp file + rename) so a crash or concurrent writer can never leave a torn file behind.
Types ¶
type Config ¶
type Config struct {
Endpoint string `json:"endpoint"`
APIKey string `json:"api_key"`
Scope string `json:"scope,omitempty"`
}
Config holds the CLI configuration stored in config.json.
func LoadConfig ¶
LoadConfig resolves configuration with environment variables taking precedence. It checks SKAEL_URL and SKAEL_KEY first, then falls back to ReadConfig(DefaultDir()). If only one of the two env vars is set, it returns an error naming the missing one.
func ReadConfig ¶
ReadConfig reads and parses config.json from dir.
type Placement ¶ added in v0.7.0
type Placement struct {
Agent string `json:"agent"`
Path string `json:"path"`
Scope string `json:"scope"`
}
Placement records where a synced skill was extracted.
type SyncState ¶
type SyncState struct {
LastSync string `json:"last_sync"`
Skills []SyncedSkill `json:"skills"`
}
SyncState records the last sync timestamp and each synced skill.