-
Notifications
You must be signed in to change notification settings - Fork 149
Added documentation for the node tool shell #749
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| --- | ||
| title: Shell | ||
| date: 2026-04-30 | ||
| sidebar_position: 1 | ||
| --- | ||
|
|
||
| <head> | ||
| <title>Shell - RocketRide Documentation</title> | ||
| </head> | ||
|
|
||
| ## What it does | ||
|
|
||
| Tool node that runs a shell command on the host and returns stdout, stderr, and exit code. Useful for build scripts, package managers, file operations, and host-installed git. | ||
|
|
||
| ## As a tool | ||
|
|
||
| When connected to an agent, exposes one function under the configured server name (default: `shell`): | ||
|
|
||
| | Function | Description | | ||
| | --------------- | ------------------------------------------------------------ | | ||
| | `shell.execute` | Run a shell command and return stdout, stderr, and exit code | | ||
|
|
||
| **`shell.execute` parameters:** | ||
|
|
||
| | Parameter | Required | Description | | ||
| | ------------- | -------- | ----------------------------------------------------------- | | ||
| | `command` | yes | Shell command to execute (interpreted by the host shell) | | ||
| | `working_dir` | no | Working directory for this call. Overrides the node default | | ||
| | `env` | no | Object of environment variables to inject for this call | | ||
| | `timeout` | no | Per-call timeout in seconds (capped by node configuration) | | ||
|
|
||
| `exit_code` is the process return code. `-1` indicates a timeout kill; `127` indicates the host shell could not be launched. | ||
|
|
||
| ## Configuration | ||
|
|
||
| | Field | Default | Description | | ||
| | ----------------------------- | --------- | -------------------------------------------------------------------------------------------------------------------------- | | ||
| | Default working directory | host CWD | Working directory used when the agent does not provide one | | ||
| | Execution timeout (seconds) | `30` | Max seconds a command may run (max 1800). On timeout the entire process tree is killed | | ||
| | Max output size (bytes) | `1048576` | Per-stream cap on stdout and stderr; output beyond this is streamed and discarded so memory stays bounded | | ||
| | Allow agent-supplied env vars | off | Whether the agent may inject env vars per call. Off by default — `LD_PRELOAD`/`PATH`/`NODE_OPTIONS` can redirect execution | | ||
| | Environment variables | — | Variables injected into every command. Override agent-supplied vars of the same name | | ||
| | Command allowlist | — | Regex patterns. If non-empty, the full command must match at least one (`re.fullmatch`). Use `.*` for substring matches | | ||
|
|
||
| ## Notes | ||
|
|
||
| - Commands run directly on the host with the privileges of the running process — no sandbox. Use the allowlist to restrict commands and avoid deploying in untrusted environments. | ||
| - An allowlist whose patterns all fail to compile is rejected at startup (fail-closed); individual invalid patterns are dropped with a warning. | ||
| - For portable git operations that don't require git on the host, prefer the Git node. | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹 Nitpick | 🔵 Trivial | ⚡ Quick win
Add one concrete request/response + allowlist example.
A minimal example for
shell.executepayload and allowlist patterns would make this safer and faster to adopt.✍️ Suggested doc addition
🤖 Prompt for AI Agents