Skip to content

Releases: guitarrapc/MiniPty

v1.3.0

Choose a tag to compare

@github-actions github-actions released this 14 Jul 18:19
Immutable release. Only release title and notes can be modified.

Overview

v1.3.0 adds MiniPty.Terminal, a new NuGet package that turns MiniPty into a terminal backend for frontends such as xterm.js and VS Code’s Pseudoterminal. It provides a node-pty–style push model (output callbacks, pause/resume flow control, drain-then-exit semantics) plus ready-made bridges over WebSocket and framed stdio. The package stays NativeAOT-compatible, depends only on MiniPty, and ships with browser and VS Code samples.

Key feature

Build real embedded terminals in .NET, in the browser, in VS Code, or behind your own UI.

With MiniPty.Terminal you can do followings.

  • Run a shell behind xterm.js, serve PTY I/O over WebSocket with built-in ACK-based flow control so fast output doesn’t stall or blow memory.
  • Wire a VS Code integrated terminal, spawn a NativeAOT helper (PtyStdioBridge) and bridge it to vscode.Pseudoterminal without node-pty or P/Invoke in the extension host.
  • Keep sessions alive across reconnects, PtyWebSocketSessionManager retains output and replays from the last acknowledged offset when a client drops and comes back.
  • Integrate any custom frontend, use PtyTerminal directly for push-model output, resize, signals, and backpressure when you bring your own transport.

Same cross-platform PTY core (Windows ConPTY, Unix PTY), now shaped for editor and web terminal backends.

MiniPty as xterm.js Web Terminal Backend

$ dotnet samples/WebTerminal.cs
WebTerminal listening on http://localhost:5170/ (Ctrl+C to stop)
terminal session started
terminal session started
terminal session ended: exit 0 # exit command
terminal session ended: exit 1 # tab closed
image

MiniPty as VS Code Terminal Backend.

image

What's Changed

  • ci: add pr harness check by @guitarrapc in #39
  • chore(deps): bump actions/setup-dotnet from 5.3.0 to 5.4.0 in the dependencies group by @dependabot[bot] in #40
  • feat: Terminal Backend PTY Support by @guitarrapc in #41
  • feat: add MiniPty.Terminal which offer persistent terminal backend PTY by @guitarrapc in #42

Full Changelog: v1.2.0...v1.3.0

v1.2.0

Choose a tag to compare

@github-actions github-actions released this 05 Jul 16:20
Immutable release. Only release title and notes can be modified.
26df003

Overview

This release enable single-file NativeAOT publish on Linux and macOS by statically linking the Unix native shim, so consumers no longer need to ship libminipty_unix.so / .dylib alongside their app.

Why?

In v1.1.0, Unix targets always used shared native libraries (.so / .dylib) copied into the publish output. v1.2.0 adds libminipty_unix.a for linux-x64, linux-arm64, osx-x64, and osx-arm64, plus buildTransitive/MiniPty.targets that automatically static-links the archive when PublishAot=true on those RIDs.

  • Linux: The PTY shim is linked into the executable; publish output is a single binary (no .so / .a sidecar).
  • macOS: The shim is statically linked, but minipty_spawn_helper is still required at runtime (posix_spawn) and is copied from the package / runtimes/ tree.
  • Windows: Unchanged — ConPTY remains in-process with no native shim.

Other RIDs (e.g. linux-musl-x64) continue to use the shared-library path via the runtime graph. CI now includes NativeAOT publish smoke tests on release, with clearer errors when native artifacts are missing.

What's Changed

  • chore(deps): bump actions/checkout from 6.0.2 to 7.0.0 in the dependencies group by @dependabot[bot] in #37
  • feat: Support NativeAOT static linking on Linux and macOS by @guitarrapc in #38

Full Changelog: v1.1.0...v1.2.0

v1.1.0

Choose a tag to compare

@github-actions github-actions released this 04 Jul 20:09
Immutable release. Only release title and notes can be modified.

Overview

Adds interactive PTY support for long-lived terminal sessions. You can stream PTY output with ReadOutputAsync, attach the host keyboard and resize events via the new MiniPty.Console package (PtyConsoleInput.Attach), and optionally record timestamped host input through IPtyConsoleInputObserver. Together, these APIs let embedders run real TUIs (vim, shells, etc.) while remaining the sole consumer of PTY output — the foundation for interactive terminal recording.

Summary

  • Interactive PTY: ReadOutputAsync, MiniPty.Console host attach, optional input observer
  • Spawn & lifecycle: environment overlay, TERM, persistent session hardening
  • Performance: fewer allocations, improved output buffering and Capture transport
  • Platforms: macOS posix_spawn, Unix/Windows reliability fixes
  • New package: MiniPty.Console

What's Changed

  • chore(deps): bump actions/create-github-app-token from 3.0.0 to 3.2.0 by @dependabot[bot] in #9
  • Implement spawn option parity with environment overlay and terminal name support by @guitarrapc in #10
  • feat: Add spawn option parity and persistent PTY output streaming by @guitarrapc in #11
  • refactor: reduce memory allocation by @guitarrapc in #12
  • refactor: Reduce default Unix spawn allocations by inheriting environment lazily by @guitarrapc in #13
  • feat: lifecycle hardening for persistent PTY sessions (Milestone 3) by @guitarrapc in #14
  • fix(windows): stream Ctrl+Z EOF for one-shot stdin by @guitarrapc in #15
  • feat: improve BoundedOutputBuffer by @guitarrapc in #16
  • feat(capture): migrate Capture to ReadOutputAsync with byte dedupe by @guitarrapc in #17
  • PR3: BoundedOutputBuffer strict handoff and Capture transport routing (gate C) by @guitarrapc in #18
  • fix(windows): reduce ReadOutputAsync drain allocations with sync ConPTY exit polling by @guitarrapc in #19
  • fix: Unix plain-script fallback differs from shebang exe by @guitarrapc in #20
  • Reduce Windows ReadOutputAsync allocations: ConPTY drain polling and producer coalescing by @guitarrapc in #21
  • feat(macos): replace forkpty with posix_spawn helper for parallel spawn stability by @guitarrapc in #22
  • refactor: Harden macOS posix_spawn path (EINTR retry + low-fd reservation) by @guitarrapc in #23
  • feat: harden forkpty child hygiene on Linux/FreeBSD (signal reset + inherited FD close) by @guitarrapc in #26
  • feat: Unify integration benchmark child process across platforms by @guitarrapc in #27
  • fix: Windows ConPTY stdout truncation in one-shot CompleteAsync / Capture by @guitarrapc in #28
  • Improve Windows ConPTY one-shot completion drain without truncating stdout by @guitarrapc in #29
  • chore: add interactive sample by @guitarrapc in #30
  • docs: update spec/plan by @guitarrapc in #31
  • fix: stabilize flaky Unix CI (fork exec payload lifetime, transport pump readiness, post-exit drain) by @guitarrapc in #32
  • feat(console): add MiniPty.Console host terminal attach (use case 3) by @guitarrapc in #33
  • docs: update lifecycle spec by @guitarrapc in #35
  • feat: Add interactive PTY recording (interactive: true) with optional typing normalization by @guitarrapc in #36

New Contributors

Full Changelog: v1.0.1...v1.1.0

v1.0.1

Choose a tag to compare

@github-actions github-actions released this 22 Jun 16:32
Immutable release. Only release title and notes can be modified.

What's Changed

  • fix: Fix Unix SendEof for stdin without a trailing newline by @guitarrapc in #8

Full Changelog: v1.0.0...v1.0.1

v1.0.0

Choose a tag to compare

@github-actions github-actions released this 22 Jun 14:53
Immutable release. Only release title and notes can be modified.

What's Changed

  • feat!: bytes-first API and allocation reduction by @guitarrapc in #4
  • refactor: change internal to Detach API, remove non-use benchmarks by @guitarrapc in #5
  • feat: use TimeProvider instead of StopWatch, remove Task.Delay alloc by @guitarrapc in #6
  • fix: too small chunk bucket for output cause large memory alloc by @guitarrapc in #7

Full Changelog: v0.3.0...v1.0.0

v0.3.0

Choose a tag to compare

@github-actions github-actions released this 22 Jun 09:45
Immutable release. Only release title and notes can be modified.

What's Changed

  • ci: add CI & Fix Ubuntu/macOS Test by @guitarrapc in #1
  • chore: nuplg workflow by @guitarrapc in #2
  • feat: add PtyDisplayTextStripper and ToDisplayText to show pty result in host console by @guitarrapc in #3

New Contributors

Full Changelog: https://github.com/guitarrapc/MiniPty/commits/v0.3.0