Skip to content

Icod.Terminal 1.17.0

Choose a tag to compare

@github-actions github-actions released this 18 Sep 15:01
· 67 commits to main since this release
ce2d76d

Icod.Terminal 1.17.0

Terminal-owned screen planning and output commitment

Icod.Terminal 1.17.0 adds the semantic live-terminal boundary needed for a later Icod.DCurses release to render through Terminal without directly consuming Icod.TermInfo. TermInfo remains Terminal's internal immutable capability-data, expansion, padding, and color authority.

The public surface is additive over the stable 1.0.0 compatibility floor and the complete 1.16 API.

Dimensions and semantic profile

  • Adds positive TerminalDimensions and TerminalSession.GetDimensions() while retaining the existing TermInfo-bearing GetSize() compatibility API.
  • Adds TerminalLifecycleEvent.Dimensions alongside the existing Size projection.
  • Adds immutable TerminalProfile and TerminalScreenCapabilities facts for selected-profile identity, color models/counts/selectors, reversible rendition attributes, ACS line glyphs, cursor visibility, and cursor addressing.
  • Keeps raw capability identifiers, terminal strings, expansion programs, and TermInfo types out of the new screen contracts.

Profile facts describe the selected terminal profile. They are not authenticated live-terminal claims and do not replace explicit bounded capability verification where verification exists.

Semantic screen planning

The new Terminal-owned vocabulary includes:

  • screen positions and cursor movement;
  • indexed and direct RGB colors;
  • normalized rendition attributes and transitions;
  • ACS line glyphs and alerts;
  • erase, character shift, line shift, scrolling, and scroll regions;
  • opaque TerminalScreenOperationPlan results.

TerminalSession.Screen exposes a session-bound, side-effect-free planner. Plans report semantic operation kind, exact encoded-byte cost, and padding-sensitive affected-line count without exposing their terminal strings or capability identities.

Candidate selection is deterministic: shortest encoded byte cost wins and stable candidate order breaks ties. Unsupported, invalid, unsafe, or non-reversible requests return controlled planning results rather than emitting partial output.

Session-bound output transactions

TerminalSession.CreateScreenOutputTransaction(...) creates a bounded, single-use transaction that can compose, in caller order:

  • same-session screen-operation plans;
  • application text;
  • strict OSC 8 hyperlink text;
  • current same-session raster-placeholder cells.

Creation captures the serialized-output epoch. Commit validates the full retained batch, rejects intervening session-owned activity before output, acquires the existing output gate, optionally frames synchronized output, writes without interleaving, performs required non-cancellable cleanup after commitment, flushes once, and releases the gate.

Pre-commit cancellation emits nothing. Ordinary cancellation after commitment does not intentionally truncate logical output or required cleanup. Independent primary and cleanup failures remain visible in deterministic order; no blind replay is attempted.

Ownership boundary

Version 1.17 does not move retained-screen policy into Terminal. Higher layers continue to own:

  • cells, windows, pads, and panels;
  • layout, clipping, wrapping, and Unicode display width;
  • desired-versus-physical screen comparison;
  • damage tracking, refresh strategy, and repaint policy.

Terminal resolves safe terminal operations and owns serialized output commitment. A renderer decides which safe operation reproduces its desired screen and whether it is preferable to rewriting.

Compatibility and qualification

The release targets:

net8.0
net9.0
net10.0

The public API snapshots are identical across all three target frameworks. The final 1.17 fingerprint is:

c0a051a925d551e526343ef59d8c47d75e41868d84235fa30bfa7debe1b3ceb9

Production dependencies are Icod.TermInfo 1.15.0 and Icod.Timing 1.0.0.

Release qualification covers Windows, Linux, and macOS runtime validation; package/API/XML/license and artifact gates; TermInfo integration; fresh package-only screen-planning and transaction consumers; published stable Icod.DCurses 1.6.0 compatibility; and a separate future-renderer consumer whose only direct package dependency is Icod.Terminal and whose source uses no TermInfo contracts.

The future-renderer witness proves API sufficiency at the package boundary. It does not claim that DCurses 2.0 has shipped.

Upgrade guidance

Existing 1.x consumers do not need to adopt the new APIs. Existing GetSize(), lifecycle Size, TerminalSession.Terminal, low-level terminal-string output, raster, persistent-resource, placeholder, and animation contracts remain available.

New rendering code should prefer GetDimensions(), Profile, Screen, and CreateScreenOutputTransaction(...) when it needs a TermInfo-free semantic screen boundary. Callers must still retain their own cell model, width policy, layout, clipping, damage, comparison, and repaint decisions.

See Architecture.md, Security-and-Privacy.md, Compatibility-and-Versioning.md, Public-API-Baseline-1.17.md, and Icod.Terminal-1.17.0-Development-Roadmap.md for the permanent contract and development evidence.