shell

package
v0.3.10 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Overview

Package shell implements the bash shell-command tool.

The tool wraps a single execution of `/bin/sh -c <command>` with these guarantees:

  • Workspace sandbox: cwd is resolved through tool.Resolve and MUST fall under the workspace root passed to Register.
  • Timeout: defaults to 120s; an explicit timeout_ms may override it. On expiry the child's process group is signalled with SIGTERM, then SIGKILL 2s later.
  • Output capture: stdout and stderr are each capped at 32 KB in the returned Result.Content; the true byte counts are reported in a truncation footer when the cap is exceeded.
  • No interactivity: stdin is redirected to /dev/null.

The tool does NOT implement PreviewableTool (shell commands are opaque), does NOT enforce permission policy (that lives in the dispatcher / permission layer in I-20), and does NOT manage background jobs (I-19).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(reg *tool.Registry, root string) error

Register adds the bash tool to reg. The workspace root is cleaned and used as the default cwd / sandbox boundary for every call.

Types

This section is empty.

Jump to

Keyboard shortcuts

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