Package 'sess'

Title: High-Performance IPC Bridge for R Sessions
Description: Implements a high-performance IPC bridge for R sessions using Unix domain sockets and Windows named pipes. Replaces legacy file-system watcher based workflows while keeping JSON-RPC communication semantics for IDE/editor integration.
Authors: Randy Lai [aut, cre], Kun Ren [ctb], Grant McDermott [ctb], Tatsuya Shima [ctb], Fred Wu [ctb]
Maintainer: Randy Lai <[email protected]>
License: MIT + file LICENSE
Version: 3.0.9000.9003
Built: 2026-10-12 15:50:55 UTC
Source: https://github.com/REditorSupport/vscode-R

Help Index


Connect to the VS Code IPC server

Description

Connect to the VS Code IPC server

Usage

connect(
  endpoint = NULL,
  use_rstudioapi = TRUE,
  plot_backend = c("auto", "jgd", "httpgd", "standard", "native"),
  attachment_id = NULL,
  auto_activate = TRUE
)

Arguments

endpoint

Character. Local named pipe / Unix domain socket endpoint. If NULL, uses SESS_ENDPOINT, then SESS_DISCOVERY_FILE.

use_rstudioapi

Logical. Enable rstudioapi emulation. Defaults to TRUE.

plot_backend

Plot backend: auto, jgd, httpgd, standard, or native. NULL also selects auto.

attachment_id

Optional opaque identifier supplied by an external terminal integration to correlate this attachment with its preparation. It must be 1-128 ASCII characters from A-Z, a-z, 0-9, _, and -. It is not an authentication token or an exclusive ownership claim.

auto_activate

Logical. Whether vscode-R should select this attachment automatically. FALSE requires attachment_id.

Details

When SESS_DISCOVERY_FILE describes the connected endpoint, an unexpected disconnect waits for a replacement endpoint in that file and reconnects with the same runtime options and session identity. The optional discovery jgdSocket string updates JGD_SOCKET when the resolved backend includes jgd; an empty string clears it, and an omitted field leaves it unchanged. Set options(sess.quiet = TRUE) to suppress the successful connection message.

Value

Invisibly returns TRUE when the IPC connection and runtime startup succeed, or FALSE when the IPC endpoint is unavailable.


Publish a rich Interactive output

Description

Publish a rich Interactive output

Usage

display(x, mime = NULL)

Arguments

x

Object to display, or text for an explicit MIME type.

mime

Optional MIME type, such as text/markdown or text/html.


Disconnect the persistent Interactive bridge without terminating R

Description

Restores sess runtime hooks without changing the frontend console callbacks.

Usage

interactive_stop()

Notify the client via IPC pipe (JSON-RPC 2.0 Notification)

Description

Notify the client via IPC pipe (JSON-RPC 2.0 Notification)

Usage

notify_client(method, params = list())

Arguments

method

A string representing the action (e.g., "dataview", "plot_updated")

params

A list containing the arguments for the command


Emulate rstudioapi (or any client action) synchronously but without blocking the R Event Loop

Description

Emulate rstudioapi (or any client action) synchronously but without blocking the R Event Loop

Usage

request_client(action, args = list())

Arguments

action

String of the action name

args

List of arguments