Documentation
¶
Index ¶
- func RuleCapabilities() *clients.RuleCapabilities
- type Client
- func (c *Client) EnsureAssetSupport(ctx context.Context, scope *clients.InstallScope) error
- func (c *Client) GetAssetPath(ctx context.Context, name string, assetType asset.Type, ...) (string, error)
- func (c *Client) GetBootstrapOptions(ctx context.Context) []bootstrap.Option
- func (c *Client) GetVersion() string
- func (c *Client) InstallAssets(ctx context.Context, req clients.InstallRequest) (clients.InstallResponse, error)
- func (c *Client) InstallBootstrap(ctx context.Context, opts []bootstrap.Option) error
- func (c *Client) IsInstalled() bool
- func (c *Client) ListAssets(ctx context.Context, scope *clients.InstallScope) ([]clients.InstalledSkill, error)
- func (c *Client) ReadSkill(ctx context.Context, name string, scope *clients.InstallScope) (*clients.SkillContent, error)
- func (c *Client) RuleCapabilities() *clients.RuleCapabilities
- func (c *Client) ScanInstalledAssets(ctx context.Context, scope *clients.InstallScope) ([]clients.InstalledAsset, error)
- func (c *Client) ShouldInstall(ctx context.Context) (bool, error)
- func (c *Client) UninstallAssets(ctx context.Context, req clients.UninstallRequest) (clients.UninstallResponse, error)
- func (c *Client) UninstallBootstrap(ctx context.Context, opts []bootstrap.Option) error
- func (c *Client) VerifyAssets(ctx context.Context, assets []*lockfile.Asset, scope *clients.InstallScope) []clients.VerifyResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RuleCapabilities ¶
func RuleCapabilities() *clients.RuleCapabilities
RuleCapabilities returns the rule capabilities for GitHub Copilot
Types ¶
type Client ¶
type Client struct {
clients.BaseClient
}
Client implements the clients.Client interface for GitHub Copilot
func (*Client) EnsureAssetSupport ¶
EnsureAssetSupport is a no-op for GitHub Copilot. Copilot discovers skills natively from the skills directory.
func (*Client) GetAssetPath ¶
func (c *Client) GetAssetPath(ctx context.Context, name string, assetType asset.Type, scope *clients.InstallScope) (string, error)
GetAssetPath returns the filesystem path for an asset
func (*Client) GetBootstrapOptions ¶
GetBootstrapOptions returns an empty list — GitHub Copilot has no hook mechanism.
func (*Client) GetVersion ¶
GetVersion returns the GitHub Copilot version. It first tries the CLI (`copilot version`), then falls back to VS Code extension version.
func (*Client) InstallAssets ¶
func (c *Client) InstallAssets(ctx context.Context, req clients.InstallRequest) (clients.InstallResponse, error)
InstallAssets installs assets to GitHub Copilot using client-specific handlers
func (*Client) InstallBootstrap ¶
InstallBootstrap is a no-op — GitHub Copilot has no hook mechanism.
func (*Client) IsInstalled ¶
IsInstalled checks if GitHub Copilot is installed by looking for known Copilot directories. This prevents sx from creating .copilot directories for users who don't use Copilot. Note: Copilot spans many editors (VS Code, JetBrains, Neovim, CLI), so this is a best-effort check. Users can also control targeting via enabledClients configuration.
func (*Client) ListAssets ¶
func (c *Client) ListAssets(ctx context.Context, scope *clients.InstallScope) ([]clients.InstalledSkill, error)
ListAssets returns all installed skills for a given scope
func (*Client) ReadSkill ¶
func (c *Client) ReadSkill(ctx context.Context, name string, scope *clients.InstallScope) (*clients.SkillContent, error)
ReadSkill reads the content of a specific skill by name
func (*Client) RuleCapabilities ¶
func (c *Client) RuleCapabilities() *clients.RuleCapabilities
RuleCapabilities returns Copilot's rule capabilities
func (*Client) ScanInstalledAssets ¶
func (c *Client) ScanInstalledAssets(ctx context.Context, scope *clients.InstallScope) ([]clients.InstalledAsset, error)
ScanInstalledAssets returns an empty list (not yet supported)
func (*Client) ShouldInstall ¶
ShouldInstall always returns true — no session tracking needed without hooks.
func (*Client) UninstallAssets ¶
func (c *Client) UninstallAssets(ctx context.Context, req clients.UninstallRequest) (clients.UninstallResponse, error)
UninstallAssets removes assets from GitHub Copilot
func (*Client) UninstallBootstrap ¶
UninstallBootstrap is a no-op — GitHub Copilot has no hook mechanism.
func (*Client) VerifyAssets ¶
func (c *Client) VerifyAssets(ctx context.Context, assets []*lockfile.Asset, scope *clients.InstallScope) []clients.VerifyResult
VerifyAssets checks if assets are actually installed on the filesystem