KetraTerm
API · DevelopmentAll versions

TerminalShellIntegrationContext

Session-scoped, read-only access for a shell producer that derives metadata from terminal output. Frames and published caches are borrowed only for the callback; never mutate or retain them. No callback may block on UI work or close the session.

Properties

Link copied to clipboard
val renderGeneration: StateFlow<Long>

Successfully published frame revisions; -1 before the first frame.

Functions

Link copied to clipboard

Borrows the most recent copied frame without acquiring terminal mutation serialization.

Link copied to clipboard
open override fun readRenderFrame(consumer: TerminalRenderFrameConsumer)
open override fun readRenderFrame(scrollbackOffset: Int, consumer: TerminalRenderFrameConsumer)
open override fun readRenderFrame(scrollbackOffset: Int, viewportRows: Int, consumer: TerminalRenderFrameConsumer)
Link copied to clipboard
open override fun readRenderFrameForAbsoluteRange(startAbsoluteRow: Long, endAbsoluteRow: Long, consumer: TerminalRenderFrameConsumer)
Link copied to clipboard
fun <T> withTerminalState(action: () -> T): T

Serializes a short compound context/frame read with parser and grid mutation.