Index signature required by RivetKit's Actions constraint.
Cancel a registered cron job by id.
Cancel the in-flight prompt for a session (leaves the session open).
Cancel ongoing agent work for a session.
Close a spawned process's stdin stream.
Tear down an ACP session abruptly.
Close a shell and free its PTY.
Connect a terminal (PTY) to the VM and return its pid.
Optionaloptions: ConnectTerminalOptionsCreate an ACP session against a registered agent and return its record.
Optionaloptions: CreateSessionOptionsCreate a time-limited, token-based preview URL for a VM port.
OptionalexpiresInSeconds: numberDelete a path (optionally recursive).
Optionaloptions: { recursive?: boolean }Gracefully destroy a session (cancel pending work, then close).
Run a command line to completion and capture its output.
Optionaloptions: ExecOptionsRun a command (argv form, no shell) to completion and capture output.
Optionalargs: readonly string[]Optionaloptions: ExecOptionsCheck whether a path exists.
Get the configurable options (model, thought level, ...) for a session.
Get the available + current modes for a session.
Get info about a single spawned process.
Replay in-memory session events (live reconnection); newer than since.
Optionaloptions: GetSequencedEventsOptionsReplay persisted session events from durable storage (transcript history).
Force-kill a running process by pid (SIGKILL).
List persisted session records (including for VMs not currently running).
Create a directory (optionally recursive).
Optionaloptions: { recursive?: boolean }Move/rename a path.
Open an interactive shell (PTY) and return its id.
Optionaloptions: OpenShellOptionsAlias of sendPrompt: send a prompt and accumulate the agent's reply.
List the immediate entries of a directory.
Recursively list directory entries with metadata.
Optionaloptions: ReaddirRecursiveOptionsRead a file from the VM filesystem.
Read several files in one call, reporting per-file content/errors.
Resize a shell's PTY.
Reply to a pending permission request raised by the agent.
Schedule a serializable cron job inside the VM.
Send a prompt to an existing session and accumulate the agent's reply.
Switch the active mode (e.g. "plan", "auto") for a session.
Switch the active model for a session.
Switch the thought/reasoning level for a session.
Export a serializable snapshot of the VM root filesystem.
Spawn a long-running process and return its pid.
Optionalargs: string[]Optionaloptions: SpawnOptionsSpawn a process inside the VM and return its pid.
Optionalargs: string[]Gracefully stop a process (SIGTERM).
Proxy an HTTP request to a port inside the VM and return the response.
Optionaloptions: VmFetchOptionsWait for a process to exit and return its exit code.
Write a file into the VM filesystem.
Write several files in one call, reporting per-file success.
Write data to a spawned process's stdin.
Write input to a shell's PTY.
The
vm.*action surface as the SERVER defines it. Each handler receives the RivetKit action context (c) as its first argument; RivetKit strips that context when projecting these onto the client handle, so callers invoke e.g.handle.createSession("claude", { env: { ANTHROPIC_API_KEY } }).The string index signature satisfies RivetKit's
Actionsconstraint.