Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions .github/workflows/compliance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: compliance

on:
push:
branches: [main, "recover-*", "release/**", "hotfix/**"]
branches: [main, "recover-*"]
pull_request:
branches: [main, "release/**"]
branches: [main]
workflow_dispatch:
workflow_call:

Expand Down Expand Up @@ -123,4 +123,6 @@ jobs:
run: |
call "%VCVARSALL%" x64
where cl.exe
python -m unittest tests.compliance.test_windows_msvc_smoke
python -m unittest ^
tests.compliance.test_windows_msvc_smoke ^
tests.test_windows_pwsh
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Changelog

## Unreleased

### Changed

- Windows string commands now prefer a trusted PowerShell 7 launcher and
automatically retain `cmd.exe` compatibility when `pwsh` is unavailable.
The selected shell is visible to agents, and safe mode conservatively gates
dynamic syntax for both interpreters.

## 0.3.0 - 2026-08-13

### Changed
Expand Down
24 changes: 21 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,22 @@ walkthroughs, and troubleshooting live in
[docs/quickstart.md](docs/quickstart.md) and
[docs/mcp-client-config.md](docs/mcp-client-config.md).

On Windows, string commands prefer PowerShell 7 (`pwsh`) with
`-NoLogo -NoProfile -NonInteractive`. If `pwsh` is unavailable, the server
automatically preserves command execution through a trusted `cmd.exe`
compatibility fallback. `server_info`, `check_exec_environment`, and each
`exec_command` result disclose the selected shell so agents can use the right
syntax. Set `CODING_TOOLS_MCP_PWSH_PATH` to an absolute trusted `pwsh.exe` path
to pin PowerShell; an invalid explicit pin is reported instead of ignored.

Because PowerShell resolves commands at runtime, `safe` mode on Windows gates
dynamic syntax — variables, splatting, call and dot-source operators, `::`
member access, alias/expression evaluation, and nested shells — behind the
`shell_expansion` and `inline_script` permissions. Literal commands are
unaffected; use `request_permissions` or `trusted` mode for the rest. Under the
`cmd.exe` fallback, percent expansion, caret escaping, and `CALL`/`FOR`
evaluation likewise require `shell_expansion`.

## Seven things to try

**1. Make Claude Desktop your coding agent.** The config above is all it
Expand Down Expand Up @@ -119,9 +135,11 @@ Per-workspace profiles, server and tunnel start/stop, credential setup with
clipboard helpers, live health checks. English and 简体中文.

**6. Keep an interactive command alive.** `exec_command` starts a REPL or
debugger under a real PTY; `write_stdin` feeds it across turns; `read_output`
pages long output; `kill_command` cleans up. Long-running processes are
first-class, with deadline watchdogs and bounded buffers.
debugger under a real POSIX PTY; `write_stdin` feeds it across turns;
`read_output` pages long output; `kill_command` cleans up. Long-running
processes are first-class, with deadline watchdogs and bounded buffers.
Windows prefers PowerShell 7 and otherwise uses the disclosed `cmd.exe`
fallback for non-TTY commands; ConPTY remains a separate limitation.

**7. Give your own agent production-grade hands.** Building an agent loop with
the Anthropic SDK or anything else? Don't hand-roll file and exec tools —
Expand Down
7 changes: 7 additions & 0 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,13 @@ npx coding-tools-mcp --stdio --workspace /path/to/repo # Node 工具链
[docs/quickstart.md](docs/quickstart.md) 与
[docs/mcp-client-config.md](docs/mcp-client-config.md)。

在 Windows 上,字符串命令优先使用 PowerShell 7(`pwsh`);未安装时会自动回退到
可信系统路径中的 `cmd.exe`,不会让 agent 因缺少额外 shell 而失去命令执行能力。
`server_info`、`check_exec_environment` 和每次 `exec_command` 都会说明实际使用的
shell,便于 agent 选择正确语法。运维方也可以通过
`CODING_TOOLS_MCP_PWSH_PATH` 固定一个绝对的 `pwsh.exe` 路径;显式路径配置错误时
会直接报错,不会掩盖配置问题。

## 七个值得一试的玩法

**1. 让 Claude Desktop 成为你的编程 agent。**
Expand Down
Loading
Loading