vscode

package
v0.0.0-...-4929a4e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 13, 2026 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Overview

Package vscode is the client adapter for Visual Studio Code.

Index

Constants

View Source
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.

View Source
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

Activate installs through the shared Copilot CLI, or leaves a VS Code settings follow-up when that CLI is missing.

func (*Adapter) AutomaticallyActivates

func (*Adapter) AutomaticallyActivates(env clients.Env, request domain.ActivationRequest) bool

AutomaticallyActivates reports that Activate will drive the shared Copilot CLI that VS Code uses as its plugin backend.

func (*Adapter) Deactivate

Deactivate uninstalls through the shared Copilot CLI after confirmation.

func (*Adapter) DetectSurfaces

func (*Adapter) DetectSurfaces(host clients.Host) clients.Detection

DetectSurfaces probes the `code` CLI, the per-user configuration root and the desktop application.

func (*Adapter) ID

func (*Adapter) ID() domain.ClientID

ID reports the client this adapter serves.

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

func (*Adapter) NativeRegistry(in clients.PlanInput) (string, string)

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

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) UsesNativeRegistryExecutable() bool

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 (*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) DetectSurfaces

func (a *LocalAdapter) DetectSurfaces(host clients.Host) clients.Detection

func (*LocalAdapter) ID

func (*LocalAdapter) InspectNativeRegistry

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 (*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"
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL