HostEventSink
Host-facing events emitted while parser commands are mapped to core state.
Hosts receive metadata and decide whether host-side actions can be honored. Grid mutation and terminal modes remain owned by core; session coordinates transport changes and terminal-to-host byte responses.
Parser metadata callbacks are synchronous and ordered on the mutation caller's thread. A TerminalSession holds its mutation lock during delivery. Return promptly; do not mutate the session or wait for a UI thread. Schedule UI work using the product's lifecycle. Direct sinks propagate exceptions to the caller; the PTY convenience bridge isolates and reports listener failures. Read-execution audits may arrive on session workers as documented below. No initial state replay or per-frame delivery is performed.
Functions
Reports a completed logical column switch with synchronized core/transport dimensions. Hosts may schedule a physical window resize according to their own permission and layout policy. Called during parsing; do not wait for the EDT or mutate the grid.
Called after a valid OSC 7 current-working-directory URI is accepted.
Called when the shell requests deminimizing (restoring) the window.
Called after a new OSC 8 registry entry is accepted. hyperlinkId is a positive session-local numeric identity; id is the optional application ID. Reusing an existing entry emits no registration. No browser action is implied.
Called after LRU eviction makes hyperlinkId unresolvable. Registration of a replacement follows all removals. Lowered limits can evict multiple entries, including when reusing an explicit key without registering a replacement. Numeric IDs are never reassigned. Closing OSC 8 or soft reset does not remove existing registry entries.
Called after hard reset clears a nonempty registry, instead of per-ID removals.
Called after the OSC icon title metadata changes.
Called when the shell requests lowering the window.
Called when the shell requests minimizing the window.
Called when the shell requests moving the window.
Called after the effective palette changes through OSC, host theme update, or hard reset. palette is the immutable core-owned value and may be retained. Queries, denied/invalid operations, and equal values do not emit an event.
Called when the shell requests raising the window.
Prepares an 80/132-column switch before the destructive core reset.
Called when the shell requests a window resize.
Called when the shell requests maximizing or restoring the window.
Called when an OSC 133 shell integration marker is received.
Called when the shell requests a desktop notification.
Called when an OSC 52 clipboard write request requires product-host user approval and has been decoded to text.
Content-free execution audit. Unlike parser metadata, this callback can arrive on a session worker; it must be thread-safe and return promptly. Do not reenter session mutation or wait for a UI thread from this callback. Never infer execution from the earlier admission decision alone.
Admits a validated read for session execution, including read denial when terminal replies are permitted. Direct adapter embedders own the response. This synchronous callback must not access the clipboard or wait for consent.
Called after an OSC 52 terminal clipboard request is evaluated by host policy.
Called when an OSC 52 clipboard write request has been allowed by host policy and decoded to text.
Called after the OSC window title metadata changes.