shellbwrap

package
v0.3.49 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2026 License: MIT Imports: 17 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"`
}

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

type ShellOutput

type ShellOutput struct {
	ExitCode int    `json:"exitCode"`
	Stdout   string `json:"stdout"`
	Stderr   string `json:"stderr"`
}

ShellOutput is the bash tool output (same schema as tool/shell-bash).

Jump to

Keyboard shortcuts

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