Documentation
¶
Overview ¶
Package justbash runs the shell commands of easy agents and of agents that set shell: emulated in just-bash (https://github.com/vercel-labs/just-bash), through wrapper.ts run by Node.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EasyShell ¶ added in v0.2.20
func EasyShell(setup *Setup, dir string) harness.CustomShell
EasyShell returns the customShell that runs an easy agent's commands with setup, from dir, the install directory.
func Install ¶
Install writes the wrapper into dir and installs its pinned just-bash with npm unless that version is already there.
func Shell ¶
func Shell(frontmatter map[string]any, workspace, runtimeDir, dir string) (harness.CustomShell, error)
Shell returns the customShell of an agent whose frontmatter sets shell: emulated, running from dir, the install directory inside runtimeDir. It returns a zero CustomShell for other agents.
Types ¶
type Setup ¶ added in v0.2.20
type Setup struct {
// Folder is the agent's workingDirectory, resolved and checked by RocketClaw; the wrapper takes it as is.
Folder string `json:"folder"`
Commands map[string]string `json:"commands"`
// NetworkTargets nil means public addresses only.
NetworkTargets []string `json:"allowedNetworkTargets"`
// Env is the emulator's whole environment but TMPDIR: the turn's variables.
Env map[string]string `json:"env"`
// Secrets join RocketClaw's environment for commands only.
Secrets map[string]string `json:"secrets"`
// ReadOnly are folders, none inside another, shown read-only at their paths: the chat's uploads and the
// agent's skills.
ReadOnly []string `json:"readOnly"`
}
Setup is how an easy agent's commands run in just-bash for one turn.