Repository navigation
RFC: Terminal Session Recording in Start-Transcript - #421
soroshsabz wants to merge 1 commit into
Conversation
Proposed addition: engine primitives that would let third-party modules implement this cleanlyWhile working on the community-module implementation of this request ( Tier A — A console output tap (interceptor interface)An
Tier B — A managed PTY primitive (highest practical impact for module authors)A supported, cross-platform pseudo-terminal API in .NET/PowerShell: create PTY, spawn an attached process, read/write streams, receive resize notifications (ConPTY +
Tier C — A host-sponsored "nested terminal passthrough" primitiveThe host exposes what module authors currently hand-roll: raw console-mode save/restore, a VT passthrough loop, resize forwarding, clean teardown — e.g.
Tier D — Pluggable transcript sinks on
|
Terminal Session Recording in Start-Transcript
Summary
Proposes extending
Start-Transcriptwith a new-RecordTerminalcapability that records the complete terminal session — including full-screen interactive TUI applications such assconfig(Windows Server) andnmtui(RHEL) — as a time-stamped terminal stream saved in the open asciicast v3 format, optionally rendered to a video file (GIF built-in; WebM/MP4 viaffmpeg).This is the PowerShell-level equivalent of RHEL's system-wide session recording (tlog + SSSD/PAM) and of community tools like
asciinema/script(1), integrated into the familiarStart-Transcript/Stop-Transcriptexperience, with group policy support for audit scenarios.Motivation
Start-Transcripttoday only captures what flows through the PowerShell host. TUI applications open the console directly (CONIN$/CONOUT$,/dev/tty), use raw mode and the alternate screen buffer, and are effectively invisible to the transcript — as discussed in PowerShell/PowerShell#28296.Key scenarios:
Key design points
-RecordTerminal,-RecordingFormat,-RecordInput,-RecordIdleTimeLimit); existing text transcript behavior unchanged.cast(asciicast v3) is always written as the source of truth → interop withasciinema play,aggffmpegwhen available (graceful downgrade)EnableTerminalRecording,RecordingFormat,RecordingOutputDirectory)PSTerminalRecording)-RecordInputoff by default (secret capture risk); recordings noted in transcript header/footerReferences
Note for Committee: RFC number assignment and experimental feature name TBD.
This change is