external

package
v1.22.0 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2026 License: MPL-2.0 Imports: 29 Imported by: 0

Documentation

Overview

Package external hosts trusted Runtime Protocol v1 executables.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommandExitError

type CommandExitError struct {
	Code   int32
	Signal string
}

CommandExitError describes an ordinary command failure, distinct from an RPC failure.

func (*CommandExitError) Error

func (e *CommandExitError) Error() string

func (*CommandExitError) ExitCode

func (e *CommandExitError) ExitCode() int

type Host

type Host struct {
	// contains filtered or unexported fields
}

Host opens an owned plugin session per operation. It is not yet registered as a workspace driver; factory integration is a separate stage.

func New

func New(ctx context.Context, workspace *provider.AgentWorkspaceInfo) (*Host, error)

New discovers a prepared runtime without downloading it and negotiates Info. The running Devsy executable supplies the trusted supervisor entry point.

func (*Host) CommandContainerArgv

func (h *Host) CommandContainerArgv(
	ctx context.Context,
	workspaceID string,
	argv []string,
	streams driver.Streams,
) error

CommandContainerArgv preserves literal argv and raw stdout for binary agent injection. Stdin ownership and cancellation follow CommandDevContainer.

func (*Host) CommandDevContainer

func (h *Host) CommandDevContainer(ctx context.Context, params *driver.CommandParams) error

CommandDevContainer uses the container shell; RawStdout preserves protocol bytes. Once streaming starts, the host closes closable stdin on completion or cancellation. Blocking readers must unblock on Close or caller cancellation; writers must return from Write. Arbitrary io.Reader/io.Writer calls cannot be interrupted by a context.

func (*Host) DeleteDevContainer

func (h *Host) DeleteDevContainer(ctx context.Context, workspaceID string) error

func (*Host) FindDevContainer

func (h *Host) FindDevContainer(
	ctx context.Context,
	workspaceID string,
) (*config.ContainerDetails, error)

func (*Host) GetDevContainerLogs

func (h *Host) GetDevContainerLogs(
	ctx context.Context,
	workspaceID string,
	stdout, _ io.Writer,
) error

GetDevContainerLogs writes the protocol's merged binary stream to stdout. Stderr is unused because Runtime Protocol v1 Logs has no channel identity.

func (*Host) Info

func (h *Host) Info() *runtimev1.InfoResponse

Info returns a copy of the negotiated capabilities.

func (*Host) Preflight

func (h *Host) Preflight(ctx context.Context, options driver.PreflightOptions) error

func (*Host) ProvisioningPreflight

func (h *Host) ProvisioningPreflight(ctx context.Context) error

func (*Host) RunImage

func (h *Host) RunImage(ctx context.Context, request *runtimev1.RunImageRequest) error

RunImage accepts resolved protocol intent; driver conversion is a later stage.

func (*Host) StartDevContainer

func (h *Host) StartDevContainer(ctx context.Context, workspaceID string) error

func (*Host) StopDevContainer

func (h *Host) StopDevContainer(ctx context.Context, workspaceID string) error

func (*Host) TargetArchitecture

func (h *Host) TargetArchitecture(ctx context.Context, workspaceID string) (string, error)

type RuntimeError

type RuntimeError struct {
	Operation string
	Code      codes.Code
	Category  runtimev1.RuntimeErrorCode
	Retryable bool
	Message   string
}

RuntimeError preserves canonical and runtime error categories without keeping secret-bearing backend diagnostics in a caller-visible error.

func (*RuntimeError) Error

func (e *RuntimeError) Error() string

func (*RuntimeError) GRPCStatus

func (e *RuntimeError) GRPCStatus() *status.Status

Directories

Path Synopsis
internal
testfixture command

Jump to

Keyboard shortcuts

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