5 Commits
Author SHA1 Message Date
zeekay 949b6c8bdf fix: Windows/WSL compatibility for shell tools and CLI helpers
- exec_tool: add Windows shell detection (pwsh/cmd), use taskkill for process kill
- shell_detect: skip Unix paths on Windows, add pwsh/cmd fallback chain
- dev.py: replace all `which` subprocess calls with shutil.which()
- test_hanzo_dev: use shutil.which() instead of subprocess which
2026-03-09 21:10:37 -07:00
zooqueenandHanzo Dev b144973bfc fix(lint): resolve all ruff + black errors across all packages
Fix 35 ruff errors (E722, F841, B904, B905, B007, E741, S202, S310,
S306, S110, TID251, UP042, F401) and run black on 526 files.

Co-authored-by: Hanzo Dev <[email protected]>
2026-02-21 23:32:32 -08:00
zooqueenandHanzo Dev 920f767417 style: auto-fix ruff lint and format for Python 3.12
Run ruff check --fix and ruff format across the repo to fix ~495
auto-fixable lint errors (mostly I001 import sorting) and reformat
225 files to match the py312 target.

Co-authored-by: Hanzo Dev <[email protected]>
2026-02-20 21:29:31 -08:00
zeekay 8d30e5a9e3 feat(shell): remove cmd, add ksh/tcsh/csh support, shell-first exposure
- Remove 'cmd' from default TOOLS list - only detected shell exposed
- Add KshTool, TcshTool, CshTool for enterprise Unix shells
- Fallback to ShellTool (smart auto-detect) if shell detection fails
- Support ksh93, pdksh, mksh as aliases for ksh
- Bump hanzo-tools-shell to 0.6.1, hanzo-mcp to 0.10.37
2026-01-11 19:22:32 -08:00
zeekay d5f07ec514 feat(shell): add shell detection to only expose user's active shell
- Add shell_detect.py module with comprehensive shell detection:
  - Detects login shell from passwd/Directory Services
  - Detects invoking shell by walking parent processes
  - Prefers Homebrew shell paths on macOS
  - Supports override via HANZO_MCP_SHELL and HANZO_MCP_FORCE_SHELL

- Update hanzo-tools-shell to only include detected shell in TOOLS list
  - HANZO_MCP_ALL_SHELLS=1 to expose all shells
  - get_shell_tools() now supports shell_override parameter

- Add CLI options to hanzo-mcp:
  - --shell: Specify shell by name or path
  - --all-shells: Expose all shell tools
  - Updated --force-shell to include fish and dash

- Bump hanzo-tools-shell to 0.6.0 (published to PyPI)
- Bump hanzo-mcp to 0.10.36

Detection order: HANZO_MCP_SHELL > HANZO_MCP_FORCE_SHELL > CLI --shell >
invoking shell > login shell > $SHELL
2026-01-11 19:11:20 -08:00