HostPolicy
Host-facing security policy for terminal controls that can affect host state, retain host metadata, or write terminal-generated bytes back to the remote process.
The parser only recognizes protocols. This policy is evaluated in the host adapter before commands touch core state, host callbacks, metadata registries, or terminal-to-host response queues. Encoding validity is fixed by the OSC protocol contract before permission evaluation; permitting a command does not permit malformed structured data.
Constructors
Properties
deny-by-default permission and audit policy for terminal-triggered clipboard protocols such as OSC 52.
whether OSC 7 current-working-directory reports may be retained and forwarded to the host.
whether OSC 8 hyperlinks may be retained and attached to written cells.
maximum accepted OSC 7 file URI length in UTF-16 code units. Longer or malformed URIs are ignored.
maximum distinct OSC 8 hyperlink keys retained after an accepted open. Lowering the limit defers least-recently-used eviction until the next accepted open, including explicit-key reuse; policy replacement itself does not mutate the registry or notify listeners.
maximum accepted OSC 8 id= parameter length in UTF-16 code units. Longer IDs are ignored and mapped to no active hyperlink.
maximum accepted OSC 8 URI length in UTF-16 code units. Longer URIs are ignored and mapped to no active hyperlink.
maximum retained UTF-16 code units for desktop notification bodies, without splitting a valid surrogate pair.
maximum retained UTF-16 code units for desktop notification titles, without splitting a valid surrogate pair.
whether terminal-triggered desktop notification requests may be forwarded to the host.
whether OSC palette updates, color-stack operations, and palette queries may affect core color state or enqueue terminal-to-host bytes.
whether DA, DSR/CPR (including light/dark scheme queries), DECRQM mode reports, window reports, DECRQCRA, DECRQSS, XTGETTCAP, OSC 21 colors, Kitty graphics, and OSC 52 reads may enqueue terminal-to-host response bytes. DENY also suppresses unsupported-mode, DECRQSS, and graphics failure replies. OSC 52 reads also require clipboard read permission; denying responses suppresses their empty failure replies too. Clipboard writes are unaffected. OSC 21 also requires palette permission; response denial suppresses unknown-key replies while permitted color mutations still apply.
session-wide policy for OSC title updates and title-stack restore operations before adapter/core title metadata changes or host callbacks are emitted.
whether terminal-triggered window movement, resize, minimize, raise, lower, and maximize requests may be forwarded. Logical DECCOLM column switches are independent of this policy.