Skip to content

terminal.scrollback.read.v1

Read terminal scrollback

Returns one bounded page of the pane's retained scrollback, oldest row first. Omit the cursor to start at the oldest retained row; pass the cursor from the previous page to continue. A null cursor in the result means the page reached the newest row. The cursor addresses rows by position, and the emulator exposes no stable row identity, so a page whose scrollback has changed size since the cursor was issued returns invalidated instead of rows that may have shifted.

At a glance

Callable byagent, cli, plugin
Effectread — Reads state and changes nothing.
Confirmationnever — Runs without asking.
Idempotencynone
Leaves the machineno
Provided bydev.tenon.core
Contract classsealed

Input

PropertyRequiredTypeConstraints
cursornostringlength 0–64
maxLinesnointegerrange 1–2000

Output

PropertyRequiredTypeConstraints
cursoryesstring | null
invalidatedyesboolean
paneIDyesstringformat uuid, length 36–36, pattern-checked
textyesstringlength 0–49152
totalRowsyesintegerrange 0–100000

Errors it can return

These are this contract’s own failures, on top of the lifecycle errors every intent can settle with. See Errors.

  • dev.tenon.core.terminal-unavailable

Call it

From a plugin — declare it in intents.uses first:

js
const result = await tenon.intents.send("terminal.scrollback.read.v1", {})
if (!result.ok) throw new Error(result.error.code)

From a shell:

sh
tenon-cli intent send terminal.scrollback.read.v1 --input '{}'

Ask your own build for this same contract with tenon-cli intent describe terminal.scrollback.read.v1.