Provides API endpoints related to pty
Summary
Functions
Connect to PTY session
Create PTY WebSocket token
Create PTY session
Get PTY session
List PTY sessions
Remove PTY session
List available shells
Update PTY session
Types
Functions
@spec pty_connect(ptyID :: String.t(), opts :: keyword()) :: {:ok, boolean()} | {:error, OpenCode.Generated.EffectHttpApiErrorForbidden.t() | OpenCode.Generated.NotFoundError.t()}
Connect to PTY session
Establish a WebSocket connection to interact with a pseudo-terminal (PTY) session in real-time.
Options
directoryworkspace
@spec pty_connect_token(ptyID :: String.t(), opts :: keyword()) :: {:ok, pty_connect_token_200_json_resp()} | {:error, OpenCode.Generated.EffectHttpApiErrorForbidden.t() | OpenCode.Generated.NotFoundError.t()}
Create PTY WebSocket token
Create a short-lived ticket for opening a PTY WebSocket connection.
Options
directoryworkspace
@spec pty_create(body :: map(), opts :: keyword()) :: {:ok, t()} | {:error, OpenCode.Generated.BadRequestError.t()}
Create PTY session
Create a new pseudo-terminal (PTY) session for running shell commands and processes.
Options
directoryworkspace
Request Body
Content Types: application/json
@spec pty_get(ptyID :: String.t(), opts :: keyword()) :: {:ok, t()} | {:error, OpenCode.Generated.NotFoundError.t()}
Get PTY session
Retrieve detailed information about a specific pseudo-terminal (PTY) session.
Options
directoryworkspace
List PTY sessions
Get a list of all active pseudo-terminal (PTY) sessions managed by OpenCode.
Options
directoryworkspace
@spec pty_remove(ptyID :: String.t(), opts :: keyword()) :: {:ok, boolean()} | {:error, OpenCode.Generated.NotFoundError.t()}
Remove PTY session
Remove and terminate a specific pseudo-terminal (PTY) session.
Options
directoryworkspace
@spec pty_shells(opts :: keyword()) :: {:ok, [pty_shells_200_json_resp()]} | :error
List available shells
Get a list of available shells on the system.
Options
directoryworkspace
@spec pty_update(ptyID :: String.t(), body :: map(), opts :: keyword()) :: {:ok, t()} | {:error, OpenCode.Generated.BadRequestError.t()}
Update PTY session
Update properties of an existing pseudo-terminal (PTY) session.
Options
directoryworkspace
Request Body
Content Types: application/json