发布

  • chore(mcp): add Windows PowerShell installer (#444)

    frostbyte_neo 发布于 2026-05-04 16:16:32 +00:00

    • feat(mcp): add Windows PowerShell installer script

    • fix(mcp/win): force TLS 1.2, drop sha256 verify

    Addresses review feedback on PR #444:

    • Force TLS 1.2 on PS 5.1 / older Win10 where SecurityProtocol may default to SSL3/TLS1.0 and GitHub rejects.
    • Drop sha256 verification entirely. Avoids PS 5.1 vs PS 7 exception-type mismatch (WebException vs HttpResponseException) where ErrorActionPreference=Stop would abort on a missing checksum file instead of warning.
    • fix(mcp/win): apply review feedback from @ccastanedaucf
    • Add -Version and -InstallDir params (with FFF_MCP_VERSION / FFF_MCP_INSTALL_DIR env-var fallbacks for irm | iex usage).
    • Detect arch via registry (HKLM...\Environment) instead of $env:PROCESSOR_ARCHITECTURE — env vars lie under x86/ARM64 emulation.
    • Skip release-list scan when -Version is pinned.
    • Prefer curl.exe (ships with Win10 1803+) for downloads, fall back to iwr with $ProgressPreference='SilentlyContinue' to dodge PS 5.1's slow progress bar.
    • Append install dir to current-session PATH so the user does not need a new shell.
    • feat(mcp/win): add -PathScope param for $PROFILE-style PATH persistence

    Per @PurpleMyst feedback: some pwsh users prefer appending to $PROFILE *nix-style
    rather than setting the user environment variable globally.

    -PathScope User (default) — set HKCU Environment.Path (existing behavior)
    -PathScope Profile — append $env:PATH += ';...' to $PROFILE.CurrentUserAllHosts
    -PathScope None — skip persistence entirely

    Env-var fallback: FFF_MCP_PATH_SCOPE (for the irm | iex case).
    Current-session $env:PATH still updated regardless of scope.

    下载附件