Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BridgeClient ¶
type BridgeClient interface {
ExecuteTask(ctx context.Context, task models.Task) error
ExecuteWorkspace(ctx context.Context, workspace models.Workspace) error
}
BridgeClient is the interface for sending tasks and workspaces to the VSCode bridge. *client.Client satisfies this interface.
type BridgeInfo ¶
type BridgeInfo struct {
Port int `json:"port"`
PID int `json:"pid"`
InstanceID int64 `json:"instance_id"`
WorkspacePath string `json:"workspace_path"`
WorkspaceName string `json:"workspace_name"`
Timestamp time.Time `json:"timestamp"`
AuthToken string `json:"auth_token"`
Secure bool `json:"secure"`
}
func DiscoverBridge ¶
func DiscoverBridge() (*BridgeInfo, error)
DiscoverBridge finds the correct bridge instance, preferring the most precise signal available: the per-window VSTR env var, then the parent VSCode process, then a scan of the bridge directory. The env path trusts the window-scoped VSTR_TOKEN directly when present; the process-tree and scan paths validate each candidate file via validateBridgeFile.
type ProcessInspector ¶
type ProcessInspector interface {
Getppid() int
NewProcess(pid int32) (ProcessNode, error)
}
ProcessInspector creates a ProcessNode for a given PID and returns the parent PID.
type ProcessNode ¶
type ProcessNode interface {
Name() (string, error)
Cmdline() (string, error)
Parent() (ProcessNode, error)
PID() int32
}
ProcessNode represents a single OS process in a traversable tree. Tests supply an in-memory fake; production uses gopsutilProcessNode.
type Runner ¶
type Runner struct {
// contains filtered or unexported fields
}
Runner orchestrates execution of tasks in VSCode terminals via the authenticated bridge
func NewRunner ¶
NewRunner creates a new runner instance connected to the VSCode bridge. It discovers the bridge, creates a real client, and wires the production repositories.
func NewRunnerWithDeps ¶
func NewRunnerWithDeps(deps RunnerDeps) *Runner
NewRunnerWithDeps creates a Runner with fully injected dependencies. Use this constructor in tests to supply fakes for any dependency.
func (*Runner) RunWorkspace ¶
RunWorkspace executes all tasks in a workspace
type RunnerDeps ¶
type RunnerDeps struct {
Client BridgeClient
Tasks TaskRepository
Workspaces WorkspaceRepository
}
RunnerDeps groups the injectable dependencies for NewRunnerWithDeps.
type TaskRepository ¶
TaskRepository is the interface for looking up a single task by name.
type VSCodeInstance ¶
VSCodeInstance represents a running VSCode process (minimal version)