You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add macOS support via platform abstraction layer (#6)
* feat: add macOS terminal support via platform abstraction layer
Introduce a platform abstraction layer (bwssh.platform) that encapsulates
all OS-specific behavior behind common interfaces, enabling macOS support
with zero breaking changes to existing Linux functionality.
Changes across all 5 platform areas:
- Process credentials: LOCAL_PEERCRED/LOCAL_PEERPID on macOS (vs SO_PEERCRED)
- Process metadata: libproc/sysctl via ctypes on macOS (vs /proc filesystem)
- Authorization: socket-permission-based auth on macOS (vs D-Bus polkit)
- Service management: launchd user agents on macOS (vs systemd units)
- Sleep/wake events: NSWorkspace notifications on macOS (vs logind D-Bus)
Also adds:
- Conditional dbus-fast dependency (Linux-only via sys_platform marker)
- Optional pyobjc-framework-Cocoa extra for macOS sleep watcher
- launchd plist template and --launchd install flag
- Platform-aware runtime directory resolution
- Comprehensive platform test suite (14 pass, 5 macOS-only skip on Linux)
All 487 existing tests continue to pass unchanged.
https://claude.ai/code/session_0163PhXY1cy3hnDYDPiTf3Fz
* docs: add macOS terminal support implementation plan
https://claude.ai/code/session_0163PhXY1cy3hnDYDPiTf3Fz
* fix: resolve CI failures for macOS platform port
- Remove plan.md from repository
- Fix ruff formatting on _darwin.py and _linux.py
- Add sys_platform marker to macos-sleep extra so pyobjc is
only required on macOS (fixes --all-extras on Linux)
https://claude.ai/code/session_0163PhXY1cy3hnDYDPiTf3Fz
* fix: resolve mypy errors in _darwin.py
- Cast struct.unpack result to int to fix no-any-return
- Remove unused type: ignore comments on AppKit import and SleepObserver
https://claude.ai/code/session_0163PhXY1cy3hnDYDPiTf3Fz
* fix: remove unused I001 noqa directive in _darwin.py
https://claude.ai/code/session_0163PhXY1cy3hnDYDPiTf3Fz
* docs: add macOS installation and setup instructions
- Update introduction to cover both Linux and macOS
- Add macOS setup section to installation guide (launchd, SSH_AUTH_SOCK,
sleep-lock extra, platform notes)
- Update CLI commands reference with --launchd flag
- Add macOS examples for SSH_AUTH_SOCK and launchd
- Add macOS authorization notes to security guide
https://claude.ai/code/session_0163PhXY1cy3hnDYDPiTf3Fz
---------
Co-authored-by: Claude <noreply@anthropic.com>
0 commit comments