Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( TypeMCP = Type{ Key: "mcp", Label: "MCP Server", Description: "Model Context Protocol server", } // TypeMCPRemote is a deprecated alias for TypeMCP. // Kept for backwards compatibility with existing lock files and vaults. TypeMCPRemote = TypeMCP TypeSkill = Type{ Key: "skill", Label: "Skill", Description: "Reusable AI skill", } TypeAgent = Type{ Key: "agent", Label: "Agent", Description: "AI agent configuration", } TypeCommand = Type{ Key: "command", Label: "Command", Description: "Slash command", } TypeHook = Type{ Key: "hook", Label: "Hook", Description: "Git hook script", } TypeClaudeCodePlugin = Type{ Key: "claude-code-plugin", Label: "Claude Code Plugin", Description: "Claude Code plugin with bundled assets", } TypeRule = Type{ Key: "rule", Label: "Rule", Description: "Shared AI coding rule", } // TypeAppPlugin extends the sx DESKTOP APP itself ("extension" in UI // copy — docs/app-plugins-spec.md). Never installed into AI coding // clients: no client declares support for it, and the app hides it // from asset views (it surfaces only in the Extensions screen). TypeAppPlugin = Type{ Key: "app-plugin", Label: "Extension", Description: "sx desktop app extension", } )
Functions ¶
func InferDescription ¶
InferDescription pulls a short description out of markdown content: frontmatter description first, else the first non-heading paragraph line. One source of truth for every surface that needs a description when metadata doesn't carry one (publish backfill, vault listings, the app's draft editor).
Types ¶
type Asset ¶
type Asset struct {
Name string
Version string
Type Type
Config map[string]string // Type-specific config (e.g., marketplace for plugins)
}
Asset represents a simple asset with just name, version, and type
type Type ¶
Type represents the type of asset (skill, command, agent, etc.)
func ClientTypes ¶
func ClientTypes() []Type
ClientTypes returns the types AI coding clients can carry — AllTypes minus app-plugin, which extends the sx desktop app itself and never installs into an AI tool (docs/app-plugins-spec.md).
func (Type) MarshalText ¶
MarshalText implements encoding.TextMarshaler for TOML/JSON serialization
func (*Type) UnmarshalText ¶
UnmarshalText implements encoding.TextUnmarshaler for TOML/JSON deserialization