Something went wrong. Try again.
This repository has no description
Something went wrong. Try again.
1234567891011121314151617181920export const SHELL_INPUT_BYTES = 32_768;export const SHELL_OUTPUT_BYTES = 32_768;export const SHELL_MAX_MS = 45_000;export const SHELL_MAX_ACTIVE = 4;
export const SHELL_INSTRUCTIONS = `\nThe shell tool runs Bash, Node.js or Bun in a fresh isolated Linux container per invocation. Write scripts and temporary input files within that single command. For quote-heavy or multiline JavaScript, use a single-quoted heredoc (node <<'JS', the script, then JS on its own line); do not put the script inside nested node -e quotes. If a command fails and the task still requires execution, make another structured shell tool call with corrected input; never print shell(...) or [shell(...)] as a substitute for a tool call. Container teardown is requested at invocation end, cancellation, or runtime restart. If cleanup is pending, report that file/process removal is still unconfirmed. No files carry over to another invocation. Commands have a maximum 45-second lifetime including startup and 32 KiB combined output. No Worker/provider credentials or project files are supplied. This is temporary computation, not durable storage or an artifact service. Recovered calls may execute again; do not claim exactly-once external side effects.\n`;
export interface ShellResult { status: "running" | "succeeded" | "failed"; stdout: string; stderr: string; outputBytes: number; exitCode: number | null; truncated: boolean; error?: "cancelled" | "timeout" | "output_limit" | "unavailable" | "command_failed"; cleanup: "pending" | "closed"; workspaceLifetime: "invocation";}