sandbox

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package sandbox defines the supported sandbox runtime types for task execution containers.

Wallfacer supports multiple AI agent runtimes (currently Claude Code and OpenAI Codex). This package provides the Type enum, parsing, validation, and default resolution so that sandbox selection is consistent across configuration, container launching, and the UI. Claude is the default when no explicit sandbox is specified.

Connected packages

No internal dependencies (stdlib only). Consumed broadly: [envconfig] (sandbox routing configuration), [store] (task sandbox field and activity routing), [runner] (container image selection and command building), [handler] (sandbox dropdowns and validation), and [cli] (sandbox image management). When adding a new sandbox type, update All, add the new constant, and ensure container image build support exists in the Makefile.

Usage

sb, ok := sandbox.Parse("claude")
sb = sandbox.Default("")  // returns sandbox.Claude
for _, t := range sandbox.All() { ... }

Package sandbox defines the supported sandbox runtime types.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Type

type Type string

Type identifies a sandbox runtime (e.g. "claude", "codex").

const (
	Claude Type = "claude"
	Codex  Type = "codex"
)

Sandbox runtime constants.

func All

func All() []Type

All returns a copy of all known sandbox types.

func Default

func Default(value string) Type

Default returns the parsed Type or Claude if the value is unrecognised.

func Normalize

func Normalize(value string) Type

Normalize returns the canonical lowercase Type, even for unknown values.

func Parse

func Parse(value string) (Type, bool)

Parse attempts to parse value into a known sandbox Type.

func (Type) IsValid

func (t Type) IsValid() bool

IsValid reports whether t is a known sandbox type.

func (Type) OrDefault

func (t Type) OrDefault() Type

OrDefault returns t if valid, otherwise Claude.

Jump to

Keyboard shortcuts

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