Added
- Async parallel chain support: Chains with
{ parallel: [...] }steps now work in async mode. Previously they were rejected with "Async mode doesn't support chains with parallel steps." The async runner now spawns concurrent pi processes for parallel step groups with configurableconcurrencyandfailFastoptions. Inspired by PR #31 from @marcfargas. - Comprehensive test suite: 85 integration tests and 12 E2E tests covering all execution modes (single, parallel, chain, async), error handling, template resolution, and tool validation. Uses
@marcfargas/pi-test-harnessfor subprocess mocking and in-process session testing. Thanks @marcfargas for PR #32. - GitHub Actions CI workflow running tests on both Ubuntu and Windows with Node.js 24.
Changed
- BREAKING:
shareparameter now defaults tofalse. Previously, sessions were silently uploaded to GitHub Gists without user consent. Users who want session sharing must now explicitly passshare: true. Added documentation explaining what the feature does and its privacy implications.
Fixed
mapConcurrentwithlimit=0returned array of undefined values instead of processing items sequentially. Now clamps limit to at least 1.- ANSI background color bleed in truncated text. The
truncLinefunction now properly tracks and re-applies all active ANSI styles (bold, colors, etc.) before the ellipsis, preventing style leakage. Also usesIntl.Segmenterfor correct Unicode/emoji handling. Thanks @monotykamary for identifying the issue. detectSubagentErrorno longer produces false positives when the agent recovers from tool errors. Previously, any error in the last tool result would override exitCode 0→1, even if the agent had already produced complete output. Now only errors AFTER the agent's final text response are flagged. Thanks @marcfargas for the fix and comprehensive test coverage.- Parallel mode (
tasks: [...]) now returns aggregated output from all tasks instead of just a success count. Previously only returned "3/3 succeeded" with actual task outputs lost. - Session sharing fallback no longer fails with
ERR_PACKAGE_PATH_NOT_EXPORTED. The fallback now resolves the main entry point and walks up to find the package root instead of trying to resolvepackage.jsondirectly. - Skills from globally-installed npm packages (via
pi install npm:...) are now discoverable by subagents. Previously only scanned local.pi/npm/node_modules/paths, missing the global npm root where pi actually installs packages. - Windows compatibility: Fixed
ENAMETOOLONGerrors when tasks exceed command-line length limits by writing long tasks to temp files using pi's@filesyntax. Thanks @marcfargas. - Windows compatibility: Suppressed flashing console windows when spawning async runner processes (
windowsHide: true). - Windows compatibility: Fixed pi CLI resolution in async runner by passing
piPackageRootthrough togetPiSpawnCommand. - Cross-platform paths: Replaced
startsWith("/")checks withpath.isAbsolute()for correct Windows absolute path detection. Replaced template string path concatenation withpath.join()for consistent path separators. - Resilience: Added error handling and auto-restart for the results directory watcher. Previously, if the directory was deleted or became inaccessible, the watcher would die silently.
- Resilience: Added
ensureAccessibleDirhelper that verifies directory accessibility after creation and attempts recovery if the directory has broken ACLs (can happen on Windows with Azure AD/Entra ID after wake-from-sleep).