Documentation
¶
Index ¶
- Constants
- func NormalizeRegistryVisibility(visibility string) string
- func ParseConfigSource(rc RegistryConfig) (source.SourceSpec, error)
- func VisibilityForLegacyType(regType string) string
- type AdoptionConfig
- type Config
- func (c *Config) AddRegistry(rc RegistryConfig)
- func (c *Config) AdoptionMode() string
- func (c *Config) AdoptionPaths() ([]string, error)
- func (c *Config) EnabledRegistries() []RegistryConfig
- func (c *Config) EnabledSources() []RegistrySource
- func (c *Config) FindRegistry(repo string) *RegistryConfig
- func (c *Config) FindRegistryByKeyOrRepo(input string) *RegistryConfig
- func (c *Config) Save() error
- func (c *Config) TeamRepos() []string
- func (c *Config) ValidateSources() error
- type RegistryConfig
- type RegistrySource
- type ScribeAgentConfig
- type ToolConfig
Constants ¶
const ( RegistryTypeGitHub = "github" // kind: legacy-migrated registry (no type info at migration time) RegistryTypeTeam = "team" // kind: org/team registry with scribe.yaml RegistryTypeCommunity = "community" // kind: community registry (marketplace or tree scan) RegistryVisibilityPublic = "public" RegistryVisibilityPrivate = "private" RegistryVisibilityUnknown = "unknown" )
Variables ¶
This section is empty.
Functions ¶
func ParseConfigSource ¶
func ParseConfigSource(rc RegistryConfig) (source.SourceSpec, error)
func VisibilityForLegacyType ¶
Types ¶
type AdoptionConfig ¶
type AdoptionConfig struct {
Mode string `yaml:"mode,omitempty"` // "auto" | "prompt" | "off"
Paths []string `yaml:"paths,omitempty"` // optional extra dirs; builtins always included
}
AdoptionConfig holds settings for local skill adoption scanning.
type Config ¶
type Config struct {
Registries []RegistryConfig `yaml:"registries,omitempty"`
Token string `yaml:"token,omitempty"`
Tools []ToolConfig `yaml:"tools,omitempty"`
Editor string `yaml:"editor,omitempty"`
Adoption AdoptionConfig `yaml:"adoption,omitempty"`
ScribeAgent ScribeAgentConfig `yaml:"scribe_agent"`
BuiltinsVersion int `yaml:"builtins_version,omitempty"`
LazyGitHub bool `yaml:"-"`
}
Config holds user preferences from ~/.scribe/config.yaml.
func Load ¶
Load reads ~/.scribe/config.yaml, falling back to config.toml with auto-migration. Priority: config.yaml > config.toml (migrated) > empty config.
func (*Config) AddRegistry ¶
func (c *Config) AddRegistry(rc RegistryConfig)
AddRegistry adds or updates a registry in the config.
func (*Config) AdoptionMode ¶
AdoptionMode returns the validated adoption mode, defaulting to "auto".
func (*Config) AdoptionPaths ¶
AdoptionPaths returns the full list of directories to scan for adoptable skills. Builtins (~/.claude/skills and ~/.codex/skills) are always first, followed by any user-configured paths. Tilde and relative paths are resolved against the user's home directory. Paths outside the home directory are rejected.
func (*Config) EnabledRegistries ¶
func (c *Config) EnabledRegistries() []RegistryConfig
EnabledRegistries returns all registries that are enabled.
func (*Config) EnabledSources ¶
func (c *Config) EnabledSources() []RegistrySource
func (*Config) FindRegistry ¶
func (c *Config) FindRegistry(repo string) *RegistryConfig
FindRegistry returns the RegistryConfig for a given repo, or nil if not found.
func (*Config) FindRegistryByKeyOrRepo ¶
func (c *Config) FindRegistryByKeyOrRepo(input string) *RegistryConfig
func (*Config) TeamRepos ¶
TeamRepos returns the list of enabled legacy registry repo strings. Backward-compatible helper for GitHub-only code that previously used Config.TeamRepos.
func (*Config) ValidateSources ¶
type RegistryConfig ¶
type RegistryConfig struct {
ID string `yaml:"id,omitempty"`
Repo string `yaml:"repo,omitempty"`
Enabled bool `yaml:"enabled"`
Builtin bool `yaml:"builtin,omitempty"`
Type string `yaml:"type,omitempty"`
Visibility string `yaml:"visibility,omitempty"`
Writable bool `yaml:"writable,omitempty"`
Source *source.SourceSpec `yaml:"source,omitempty"`
}
RegistryConfig describes a connected skill registry.
func (RegistryConfig) Identity ¶
func (rc RegistryConfig) Identity() source.SourceIdentity
func (RegistryConfig) IsPublic ¶
func (rc RegistryConfig) IsPublic() bool
IsPublic returns true only for registries verified or migrated as public.
func (RegistryConfig) IsTeam ¶
func (rc RegistryConfig) IsTeam() bool
IsTeam returns whether this is a team registry.
func (*RegistryConfig) Normalize ¶
func (rc *RegistryConfig) Normalize()
Normalize fills privacy-safe defaults for legacy or incomplete registry rows.
func (RegistryConfig) SourceSpec ¶
func (rc RegistryConfig) SourceSpec() source.SourceSpec
type RegistrySource ¶
type RegistrySource struct {
ID string
Config RegistryConfig
Source source.SourceSpec
Identity source.SourceIdentity
}
type ScribeAgentConfig ¶
type ScribeAgentConfig struct {
Enabled bool `yaml:"enabled"`
// contains filtered or unexported fields
}
ScribeAgentConfig controls embedded bootstrap behavior.
func (*ScribeAgentConfig) UnmarshalYAML ¶
func (c *ScribeAgentConfig) UnmarshalYAML(value *yaml.Node) error
type ToolConfig ¶
type ToolConfig struct {
Name string `yaml:"name"`
Enabled bool `yaml:"enabled"`
Type string `yaml:"type,omitempty"` // "builtin" or "custom"
Detect string `yaml:"detect,omitempty"` // shell command used to detect custom tools
Install string `yaml:"install,omitempty"` // shell command template for custom tools
Uninstall string `yaml:"uninstall,omitempty"` // shell command template for custom tools
Path string `yaml:"path,omitempty"` // optional installed-path template for custom tools
}
ToolConfig describes an AI tool target for skill installation.