external

package
v1.23.0-beta.1 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2026 License: MPL-2.0 Imports: 32 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 workspace runtime operation.

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) RecreateMode added in v1.23.0

func (h *Host) RecreateMode() driver.RecreateMode

func (*Host) RequiresMountStreaming added in v1.23.0

func (h *Host) RequiresMountStreaming() bool

func (*Host) RequiresWorkspaceChown added in v1.23.0

func (h *Host) RequiresWorkspaceChown() bool

func (*Host) RunImage

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

RunImage accepts resolved protocol intent and validates negotiated mount support.

func (*Host) RunImageDevContainer added in v1.23.0

func (h *Host) RunImageDevContainer(
	ctx context.Context,
	params *driver.RunImageDevContainerParams,
) error

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) SupportsMountType added in v1.23.0

func (h *Host) SupportsMountType(kind string) bool

func (*Host) TargetArchitecture

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

func (*Host) ValidateRunImageDevContainer added in v1.23.0

func (h *Host) ValidateRunImageDevContainer(params *driver.RunImageDevContainerParams) 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