Documentation
¶
Overview ¶
Package vscode is the client adapter for Visual Studio Code.
Index ¶
- Constants
- func QualifiedDarwinTESTTuple() domain.LocalQualifiedTuple
- func SourceQualifiedTESTTuple(goos string) domain.LocalQualifiedTuple
- type Adapter
- func (*Adapter) Activate(ctx context.Context, env clients.Env, request domain.ActivationRequest) (domain.ActivationOutcome, error)
- func (*Adapter) AutomaticallyActivates(env clients.Env, request domain.ActivationRequest) bool
- func (*Adapter) Deactivate(ctx context.Context, env clients.Env, request domain.DeactivationRequest) (domain.DeactivationOutcome, error)
- func (*Adapter) DetectSurfaces(host clients.Host) clients.Detection
- func (*Adapter) ID() domain.ClientID
- func (*Adapter) InspectNativeRegistry(ctx context.Context, env clients.Env, _ domain.DetectedClient, ...) (clients.RegistryFinding, error)
- func (*Adapter) NativeRegistry(in clients.PlanInput) (string, string)
- func (*Adapter) Project(_ context.Context, in clients.ProjectionInput) ([]domain.NativeObjectOwnership, error)
- func (*Adapter) RefinePlan(_ context.Context, in clients.PlanInput, plan *domain.DeliveryPlan) error
- func (*Adapter) UsesNativeRegistryExecutable() bool
- func (*Adapter) VerifierAvailable(_ domain.DetectedClient, _ domain.DeliveryPlan, backendExecutable string) bool
- type LocalAdapter
- func (a *LocalAdapter) Activate(ctx context.Context, env clients.Env, req domain.ActivationRequest) (domain.ActivationOutcome, error)
- func (*LocalAdapter) AuthorizeLocalPreparation(_ clients.PlanInput, plan *domain.DeliveryPlan) (bool, error)
- func (*LocalAdapter) AutomaticallyActivates(_ clients.Env, req domain.ActivationRequest) bool
- func (a *LocalAdapter) CheckPlanPrecondition(in clients.PlanInput, plan *domain.DeliveryPlan) error
- func (*LocalAdapter) Deactivate(ctx context.Context, env clients.Env, req domain.DeactivationRequest) (domain.DeactivationOutcome, error)
- func (a *LocalAdapter) DetectSurfaces(host clients.Host) clients.Detection
- func (*LocalAdapter) ID() domain.ClientID
- func (a *LocalAdapter) InspectNativeRegistry(ctx context.Context, env clients.Env, _ domain.DetectedClient, ...) (clients.RegistryFinding, error)
- func (*LocalAdapter) InspectRegistration(ctx context.Context, kernel nativeconfig.Kernel, ...) (RegistrationState, error)
- func (*LocalAdapter) NativeRegistry(in clients.PlanInput) (string, string)
- func (*LocalAdapter) PreflightActivation(env clients.Env, req domain.ActivationRequest) error
- func (a *LocalAdapter) Project(ctx context.Context, in clients.ProjectionInput) ([]domain.NativeObjectOwnership, error)
- func (a *LocalAdapter) ProjectActiveNative(ctx context.Context, root string, envelope domain.PackageEnvelope, ...) ([]domain.NativeObjectOwnership, error)
- func (a *LocalAdapter) QualifyPlan(in clients.PlanInput, plan *domain.DeliveryPlan) error
- func (*LocalAdapter) ReconcileNativeIntent(ctx context.Context, intent domain.PendingNativeIntent) (domain.ActivationOutcome, error)
- func (a *LocalAdapter) RefinePlan(ctx context.Context, in clients.PlanInput, plan *domain.DeliveryPlan) error
- func (a *LocalAdapter) ResolveProfileRoot(root string) (string, error)
- func (*LocalAdapter) TargetRoot(_ domain.DetectedClient, _ domain.PackageMode, managed string) (string, string, error)
- func (*LocalAdapter) UsesNativeRegistryExecutable() bool
- func (*LocalAdapter) ValidateBindingProfile(root string, binding domain.ClientBinding) error
- func (*LocalAdapter) VerifierAvailable(_ domain.DetectedClient, plan domain.DeliveryPlan, _ string) bool
- type LocalConfig
- type RegistrationState
Constants ¶
const DarwinTESTQualification = "TEST-B17-macos-15.6.1-arm64-APFS-fa254ee10963e8cee50a2f2dab5cf9758a2937596c3169fae9396d3f7b98a349"
DarwinTESTQualification binds only the retained B17 public-SDK Stop receipt on macOS 15.6.1 arm64/APFS. It is not installed-product or release proof.
const TESTQualification = "TEST-source-07f806f999227108933c2e30515b26eecc1fda74"
TESTQualification identifies source contracts, never production/native admission. The built-in Copilot source is pinned with VS Code; no VSIX version is inferred.
Variables ¶
This section is empty.
Functions ¶
func QualifiedDarwinTESTTuple ¶
func QualifiedDarwinTESTTuple() domain.LocalQualifiedTuple
QualifiedDarwinTESTTuple is separate from the source-only Linux/Windows tuple. The host supplies this exact qualification; the runtime must also be arm64, and changed writes must pass the held APFS backend's own admission.
func SourceQualifiedTESTTuple ¶
func SourceQualifiedTESTTuple(goos string) domain.LocalQualifiedTuple
SourceQualifiedTESTTuple returns the sole admitted source tuple. Windows is preparation only; native Windows shell/profile execution needs separate CI.
Types ¶
type Adapter ¶
type Adapter struct{}
Adapter implements the client contract for Visual Studio Code.
func New ¶
func New() *Adapter
New builds the adapter. The composition root registers it in clients/all.
func (*Adapter) Activate ¶
func (*Adapter) Activate(ctx context.Context, env clients.Env, request domain.ActivationRequest) (domain.ActivationOutcome, error)
Activate installs through the shared Copilot CLI, or leaves a VS Code settings follow-up when that CLI is missing.
func (*Adapter) AutomaticallyActivates ¶
AutomaticallyActivates reports that Activate will drive the shared Copilot CLI that VS Code uses as its plugin backend.
func (*Adapter) Deactivate ¶
func (*Adapter) Deactivate(ctx context.Context, env clients.Env, request domain.DeactivationRequest) (domain.DeactivationOutcome, error)
Deactivate uninstalls through the shared Copilot CLI after confirmation.
func (*Adapter) DetectSurfaces ¶
DetectSurfaces probes the `code` CLI, the per-user configuration root and the desktop application.
func (*Adapter) InspectNativeRegistry ¶
func (*Adapter) InspectNativeRegistry(ctx context.Context, env clients.Env, _ domain.DetectedClient, plan domain.DeliveryPlan, managed *domain.ClientBinding) (clients.RegistryFinding, error)
func (*Adapter) NativeRegistry ¶
NativeRegistry points at the Copilot installation VS Code discovers: the package is registered through the CLI of the sibling this client shares the github-copilot backend with, so the plan records that registry, not its own.
func (*Adapter) Project ¶
func (*Adapter) Project(_ context.Context, in clients.ProjectionInput) ([]domain.NativeObjectOwnership, error)
Project writes the managed GitHub Copilot marketplace that Copilot shares.
func (*Adapter) RefinePlan ¶
func (*Adapter) RefinePlan(_ context.Context, in clients.PlanInput, plan *domain.DeliveryPlan) error
RefinePlan promotes the plan when the sibling's Copilot CLI is present, which is what turns a prepared VS Code package into an installed one.
func (*Adapter) UsesNativeRegistryExecutable ¶
func (*Adapter) VerifierAvailable ¶
func (*Adapter) VerifierAvailable(_ domain.DetectedClient, _ domain.DeliveryPlan, backendExecutable string) bool
VerifierAvailable reports that an exact Copilot-family listing can be observed.
type LocalAdapter ¶
type LocalAdapter struct {
// contains filtered or unexported fields
}
LocalAdapter implements explicit selected-profile Local delivery. It shares the historical client ID, but embeds none of New's CLI lifecycle capabilities.
func NewLocal ¶
func NewLocal(config LocalConfig) (*LocalAdapter, error)
func (*LocalAdapter) Activate ¶
func (a *LocalAdapter) Activate(ctx context.Context, env clients.Env, req domain.ActivationRequest) (domain.ActivationOutcome, error)
func (*LocalAdapter) AuthorizeLocalPreparation ¶
func (*LocalAdapter) AuthorizeLocalPreparation(_ clients.PlanInput, plan *domain.DeliveryPlan) (bool, error)
func (*LocalAdapter) AutomaticallyActivates ¶
func (*LocalAdapter) AutomaticallyActivates(_ clients.Env, req domain.ActivationRequest) bool
func (*LocalAdapter) CheckPlanPrecondition ¶
func (a *LocalAdapter) CheckPlanPrecondition(in clients.PlanInput, plan *domain.DeliveryPlan) error
func (*LocalAdapter) Deactivate ¶
func (*LocalAdapter) Deactivate(ctx context.Context, env clients.Env, req domain.DeactivationRequest) (domain.DeactivationOutcome, error)
func (*LocalAdapter) DetectSurfaces ¶
func (a *LocalAdapter) DetectSurfaces(host clients.Host) clients.Detection
func (*LocalAdapter) ID ¶
func (*LocalAdapter) ID() domain.ClientID
func (*LocalAdapter) InspectNativeRegistry ¶
func (a *LocalAdapter) InspectNativeRegistry(ctx context.Context, env clients.Env, _ domain.DetectedClient, plan domain.DeliveryPlan, managed *domain.ClientBinding) (clients.RegistryFinding, error)
func (*LocalAdapter) InspectRegistration ¶
func (*LocalAdapter) InspectRegistration(ctx context.Context, kernel nativeconfig.Kernel, selected domain.SelectedDelivery, objects []domain.NativeObjectOwnership) (RegistrationState, error)
InspectRegistration distinguishes native bytes without locks or CLI listing. RegistrationActive is explicitly not proof of live Local execution.
func (*LocalAdapter) NativeRegistry ¶
func (*LocalAdapter) NativeRegistry(in clients.PlanInput) (string, string)
func (*LocalAdapter) PreflightActivation ¶
func (*LocalAdapter) PreflightActivation(env clients.Env, req domain.ActivationRequest) error
func (*LocalAdapter) Project ¶
func (a *LocalAdapter) Project(ctx context.Context, in clients.ProjectionInput) ([]domain.NativeObjectOwnership, error)
func (*LocalAdapter) ProjectActiveNative ¶
func (a *LocalAdapter) ProjectActiveNative(ctx context.Context, root string, envelope domain.PackageEnvelope, plan domain.DeliveryPlan, data string) ([]domain.NativeObjectOwnership, error)
func (*LocalAdapter) QualifyPlan ¶
func (a *LocalAdapter) QualifyPlan(in clients.PlanInput, plan *domain.DeliveryPlan) error
func (*LocalAdapter) ReconcileNativeIntent ¶
func (*LocalAdapter) ReconcileNativeIntent(ctx context.Context, intent domain.PendingNativeIntent) (domain.ActivationOutcome, error)
ReconcileNativeIntent implements the existing structurally matched selected recovery contract. The facade owns attempt/binding/global scope validation and package verification. No constructor/environment facts redirect recovery.
func (*LocalAdapter) RefinePlan ¶
func (a *LocalAdapter) RefinePlan(ctx context.Context, in clients.PlanInput, plan *domain.DeliveryPlan) error
func (*LocalAdapter) ResolveProfileRoot ¶
func (a *LocalAdapter) ResolveProfileRoot(root string) (string, error)
func (*LocalAdapter) TargetRoot ¶
func (*LocalAdapter) TargetRoot(_ domain.DetectedClient, _ domain.PackageMode, managed string) (string, string, error)
func (*LocalAdapter) UsesNativeRegistryExecutable ¶
func (*LocalAdapter) UsesNativeRegistryExecutable() bool
func (*LocalAdapter) ValidateBindingProfile ¶
func (*LocalAdapter) ValidateBindingProfile(root string, binding domain.ClientBinding) error
ValidateBindingProfile consumes persisted authority, including the native selector preimage. It creates no profile lock and never reads ambient HOME.
func (*LocalAdapter) VerifierAvailable ¶
func (*LocalAdapter) VerifierAvailable(_ domain.DetectedClient, plan domain.DeliveryPlan, _ string) bool
type LocalConfig ¶
type LocalConfig struct {
ProfileSettingsPath string
QualifiedTuple domain.LocalQualifiedTuple
TargetShell vscodelocalhooks.Target
NativeStop bool
HookSpecs []vscodelocalhooks.Spec
DeclaredHookDigest string
MCPServers, Skills []string
}
LocalConfig supplies explicit, checked host inputs. Hook executable identity is verified by the host BEFORE construction; this adapter neither selects nor downloads a runtime. Args are fixed literals with optional PLUGIN_ROOT/DATA tokens. MCP and skill names are independent selections, absent by default.
type RegistrationState ¶
type RegistrationState string
const ( RegistrationActive RegistrationState = "owned_registered_activation_unknown" RegistrationDisabled RegistrationState = "owned_disabled" RegistrationMissing RegistrationState = "missing" RegistrationConflict RegistrationState = "conflict" )