LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
LangSmith
  • Client
  • Run Trees
  • Traceable
  • Evaluation
  • Schemas
  • Langchain
  • Jest
  • Vitest
  • Wrappers
  • Anonymizer
  • Jestlike
  • Vercel
  • Anthropic
  • Sandbox
⌘I

LangChain Assistant

Ask a question to get started

Enter to send•Shift+Enter new line

Menu

LangSmith
ClientRun TreesTraceableEvaluationSchemasLangchainJestVitestWrappersAnonymizerJestlikeVercelAnthropicSandbox
Language
Theme
JavaScriptlangsmithsandboxWsRunOptions
Interface●Since v0.8

WsRunOptions

Options for the low-level WebSocket stream functions.

Copy
interface WsRunOptions

Properties

property
commandId: string

Client-assigned command ID.

property
cwd: string

Working directory for command execution.

property
env: Record<string, string>

Environment variables to set for the command.

property
headers: Record<string, string>

Additional headers attached to the WebSocket upgrade request. Merged on top of any default headers the SandboxClient was constructed with.

property
idleTimeout: number

Idle timeout in seconds. If the command has no connected clients for this duration, it is killed. Defaults to 300 (5 minutes). Set to -1 for no idle timeout.

property
killOnDisconnect: boolean

If true, kill the command immediately when the last client disconnects. Defaults to false (command continues running and can be reconnected to).

property
onStderr: (data: string) => void

Callback invoked with each stderr chunk.

property
onStdout: (data: string) => void

Callback invoked with each stdout chunk.

property
pty: boolean

Whether to allocate a PTY.

property
shell: string

Shell to use. Default: "/bin/bash".

property
timeout: number

Command timeout in seconds. Default: 60.

property
ttlSeconds: number

How long (in seconds) a finished command's session is kept for reconnection. Defaults to 600 (10 minutes). Set to -1 to keep indefinitely.

View source on GitHub