feat(pwsh): add the pwsh-local executor and the pwsh tool

Windows-native execution foundation: PwshLocalExecutor implements the bash
executor seam over ctx.subprocess (pwsh -NoLogo -NoProfile -NonInteractive
-Command, one argv element, no quoting layer; resolvePwshPath probes
PowerShell 7 / PATH / Windows PowerShell 5.1 as a pure function), and
tool-pwsh is the minimal PowerShell-dialect model-facing tool over ctx.bash
(foreground only, managed DSH_* env, timeout/signal/exit markers, terminal
and generic presenters). Both packages carry full suites (real pwsh,
self-skipping without it) at per-file 100% coverage; vitest's Windows
exclusion narrows from packages/bash/* to the bash-requiring packages so the
pwsh suites run natively on Windows too. The CLI gains the workspace deps
and tsconfig projects without mounting either plugin; the Windows-default
roadmap is recorded as a proposed Agent Note.
This commit is contained in:
Huanqi Cao
2026-08-01 18:48:17 +08:00
parent 7206c6019a
commit 8c6179d69d
34 changed files with 2341 additions and 1 deletions

View File

@@ -11,7 +11,13 @@ const pathsPlugin = (): ReturnType<typeof tsconfigPaths> => tsconfigPaths({ proj
const windowsUnsupportedPackages = process.platform === 'win32'
? [
'packages/bash/*',
// Bash-requiring suites (a real POSIX shell is unavailable on Windows).
// The pwsh-requiring suites (pwsh-local, tool-pwsh) deliberately stay
// INCLUDED: PowerShell ships with Windows, so they run natively here.
'packages/bash/bash-local',
'packages/bash/bash-sandbox',
'packages/bash/tool-bash',
'packages/bash/tool-bash-persistent',
'packages/hooks/*',
'packages/subprocess/*',
'packages/pty/pty-local',