# Changelog

All notable changes to this project will be documented here.

## 0.1.4 — 2026-08-15

### Fixed

- Bound post-exit stdio collection so a continuously writing detached descendant cannot keep a completed command open indefinitely.

### Changed

- Updated the Pi development dependency to `0.84.2` and refreshed the lockfile with no known audit vulnerabilities.
- Split minimum/latest Pi compatibility testing from security and package validation.
- Excluded the gallery preview image from the npm tarball, reducing the compressed package size from about 1.48 MB to about 14 KB.

### Added

- Added regression coverage for continuous output from an orphaned process with inherited stdio handles.
- Added CI assertions for required and excluded npm package contents.

## 0.1.3 — 2026-08-01

### Fixed

- Respect the final PowerShell command's success state instead of allowing a stale native `$LASTEXITCODE` to override it.

### Changed

- Reduced recurring model prompt overhead by shortening the shell description and consolidating PowerShell guidance.
- Deferred PowerShell runtime probing until a session starts, avoiding unnecessary subprocesses in Pi invocations that only load extensions.
- Declared the supported Pi and Node.js version ranges explicitly.
- Added minimum/latest Pi compatibility coverage and prompt-budget regression tests.

## 0.1.2 — 2026-07-30

### Added

- `pi` npm keyword for broader package-gallery discoverability.
- README comparison with the audited `@4fu/pi-pwsh@0.6.2` baseline.

## 0.1.1 — 2026-07-30

### Added

- Pi package gallery preview metadata and the PowerShell 7 preview image.

## 0.1.0 — 2026-07-30

### Added

- Native model-callable `pwsh` tool built on Pi's standard shell tool definition.
- PowerShell routing for interactive `!` and `!!` commands.
- Strict global JSON configuration with environment overrides.
- Verified PowerShell 7 runtime discovery using an absolute executable path.
- UTF-8, multiline, and long-command transport using base64 source over stdin.
- Native exit-code preservation and PowerShell cmdlet failure mapping.
- Full Windows process-tree termination for timeout and cancellation.
- Python UTF-8 and unbuffered environment defaults that preserve explicit user values.
- Unit, Windows integration, runtime, exit-code, timeout, and cancellation tests.
- Upstream provenance and MIT attribution documentation.

### Changed from @4fu/pi-pwsh 0.6.2

- Preserve Pi's dedicated `ls`, `find`, and `grep` tools by default.
- Use the resolved absolute `pwsh.exe` path for all foreground commands.
- Do not pass `-ExecutionPolicy Bypass` unless explicitly configured.
- Do not probe or advertise elevation by default.
- Do not translate or retry PowerShell source through `cmd.exe`.
- Fail without silently restoring Bash when PowerShell setup is invalid.

### Removed from the lean core

- Detached background-job emulation.
- Background-operator rewriting.
- ConPTY sessions and `node-pty`.
- Named-pipe RPC and PowerShell-to-TUI request helpers.
- Runtime dependencies and native install scripts.
