Help us shape the future of Go! Take the 2026 Go Developer Survey

shellbwrap

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2026 License: MIT Imports: 19 Imported by: 0

Documentation

Overview

Package shellbwrap provides tool/shell-bwrap: a tool/shell-bash compatible shell (the bash tool + the /shell command) whose sandbox view and bwrap wrapping are delegated to a sandbox/bwrap instance (runtime/sandbox) — the view config has a single source shared by shell / ACP subprocesses and in-process fs enforcement.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(cfg Config, d Deps) (agentkit.Tool, error)

New constructs tool/shell-bwrap. Sandbox behavior (mode / fail closed / view config) is owned by the deps.sandbox (sandbox/bwrap) instance.

Types

type Config

type Config struct {
	WorkDir        string              `json:"workDir"`
	TimeoutSeconds int                 `json:"timeoutSeconds"`
	Commands       map[string][]string `json:"commands"`
	// MaxOutputBytes caps the collected stdout/stderr bytes each; excess is
	// truncated and marked. <=0 uses the built-in default (1 MiB). Prevents a
	// command with unbounded output from blowing up runner memory.
	MaxOutputBytes int `json:"maxOutputBytes"`
}

Config configures tool/shell-bwrap (the sandbox view config lives on the sandbox/bwrap instance).

func (*Config) SetDefaults

func (c *Config) SetDefaults()

SetDefaults implements pluginkit.Defaulter.

func (*Config) Validate

func (c *Config) Validate() error

Validate implements pluginkit.Validator.

type Deps

type Deps struct {
	Workspace   workspace.Service  `json:"workspace"`
	Credentials credentials.Store  `json:"credentials,omitempty"`
	Sandbox     capsandbox.Service `json:"sandbox"`
}

Deps for tool/shell-bwrap.

type ShellInput

type ShellInput struct {
	Command string   `json:"command" jsonschema:"Shell command to execute"`
	Timeout *float64 `json:"timeout,omitempty" jsonschema:"Timeout in seconds (optional, no default timeout)"`
}

ShellInput is the bash tool input (same schema as tool/shell-bash).

Jump to

Keyboard shortcuts

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