Commit graph

28 commits

Author SHA1 Message Date
Peter Steinberger
de5a0cb97e Fix Screen Recording permission detection and improve error reporting
- Replace broken CGDisplayBounds check with ScreenCaptureKit API
- Add proper error handling to detect permission-related failures
- Add server_status subcommand to expose permission status via JSON
- Ensure users get clear error messages when permissions are missing

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-07 22:51:49 +01:00
Peter Steinberger
a491adbdf1 Enhance error handling with specific exit codes and user-friendly messages
- Add distinct exit codes for different error conditions in Swift CLI
- Map exit codes to clear, actionable error messages in Node.js server
- Replace generic "Swift CLI execution failed" with specific guidance
- Improve permission error messages to guide users to System Settings

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-07 22:44:07 +01:00
Peter Steinberger
a1505f3469 Fix SwiftFormat trailing whitespace 2025-05-27 01:23:39 +02:00
Peter Steinberger
f6e9cbc7b9 Migrate to ScreenCaptureKit 2025-05-27 01:22:52 +02:00
Peter Steinberger
731b89b779 Prepare release 2025-05-27 00:21:29 +02:00
Peter Steinberger
66cc0e76ea Update Swift tools version to 5.9 for macOS v14 support
🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-05-26 23:47:16 +02:00
Peter Steinberger
7bf63a225c Implement missing best practices
- Add npm run inspector script for MCP inspector tool
- Synchronize Swift CLI version with package.json (1.0.0-beta.9)
- Update macOS version requirement to v14 (Sonoma) for n-1 support
- Add Swift compiler warnings check in prepare-release script
- Convert tests/setup.ts from Jest to Vitest syntax
- Update server status tests to match new format

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-05-26 23:46:03 +02:00
Peter Steinberger
fe3e63f7cb Apply SwiftFormat formatting 2025-05-25 19:27:38 +02:00
Peter Steinberger
71bab246ac Replace failing test with valid screen index test
- Remove test expecting validation error that doesn't exist
- Add test for screen-index parameter instead
2025-05-25 19:27:20 +02:00
Peter Steinberger
2940a9187d Fix SwiftLint identifier name violation
- Change 'i' to 'index' in WindowManagerTests loop
2025-05-25 19:26:36 +02:00
Peter Steinberger
a547e3a578 Apply SwiftFormat to test files
- Fix import ordering
- Apply consistent formatting
- Add missing newlines at end of files
2025-05-25 19:25:58 +02:00
Peter Steinberger
431ff502a8 Fix ApplicationInfo property name in test
- Change 'name' to 'app_name' to match actual ApplicationInfo struct
2025-05-25 19:25:35 +02:00
Peter Steinberger
cd4e8b5d52 Final fixes for Swift tests to compile
- Remove references to non-existent ServerStatus type
- Fix ListCommandTests to use actual WindowsSubcommand properties
- Update PermissionsCheckerTests to test actual error types
- Remove tests for properties that don't exist in the implementation
2025-05-25 19:24:58 +02:00
Peter Steinberger
803e43cc6b Fix Swift tests to match actual implementation
- Update PermissionsCheckerTests to use static methods
- Fix ApplicationFinderTests to use correct method signatures
- Update WindowManagerTests to match actual WindowManager API
- Fix ImageCommandTests to use correct property names (path not output, etc)
- Update ListCommandTests to work with subcommand structure
- Remove tests for non-existent methods and add tests for actual functionality
2025-05-25 19:23:07 +02:00
Peter Steinberger
6b3d887547 Fix SwiftLint identifier name violation
- Change 'i' to 'index' in ListCommandTests to meet SwiftLint requirements
2025-05-25 19:14:13 +02:00
Peter Steinberger
8894154be6 Apply SwiftFormat to new test files
- Fix import ordering (XCTest after module imports)
- Add missing newlines at end of files
- Fix number formatting (underscore separators)
- Apply consistent formatting to switch statements
2025-05-25 19:13:44 +02:00
Peter Steinberger
f4a41f8355 Add comprehensive Swift unit tests and enhanced CLI testing
- Add unit test templates for all Swift components:
  - ApplicationFinderTests: Test app discovery and fuzzy matching
  - WindowManagerTests: Test window listing and filtering
  - PermissionsCheckerTests: Test permission detection
  - ImageCommandTests: Test command parsing and validation
  - ListCommandTests: Test list command variations

- Enhance release script with thorough CLI testing:
  - Test all commands with various arguments
  - Validate JSON output structure
  - Test error handling for invalid inputs
  - Check permission status reporting
  - Add dedicated Swift CLI integration test phase

- Update RELEASING.md to highlight automated checks
2025-05-25 19:12:21 +02:00
Peter Steinberger
5db4760268 Fix Swift tests to use new WindowBounds property names
Update test cases to use xCoordinate/yCoordinate instead of x/y
to match the refactored property names.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-05-25 18:47:07 +02:00
Peter Steinberger
7895e1765f Add Swift 6.0 version to SwiftFormat config and apply formatting
- Specify Swift 6.0 in .swiftformat to enable all formatting features
- Apply Swift 6 formatting improvements:
  - Use shorthand optional unwrapping syntax
  - Use implicit returns in computed properties
  - Use modern Swift 6 syntax throughout

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-05-25 18:45:20 +02:00
Peter Steinberger
d07bb0fd37 swiftformat 2025-05-25 18:43:55 +02:00
Peter Steinberger
72819798ff feat: Simplify image tool API and add screen index support\n\n- MCP image tool API simplified with app_target, new format:data behavior, and automatic AI provider selection.\n- Swift CLI image command now supports --screen-index for specific display capture.\n- Updated image.ts, relevant documentation, and tests accordingly.\n- Version bumped to 1.0.0-beta.4. 2025-05-25 18:31:50 +02:00
Peter Steinberger
e68b395e71 linting 2025-05-25 18:14:49 +02:00
Peter Steinberger
53ec5ef9a4 Add Swift linting and enhance image capture features
- Add SwiftLint and SwiftFormat configuration with npm scripts
- Refactor Swift code to comply with linting rules:
  - Fix identifier naming (x/y → xCoordinate/yCoordinate)
  - Extract long functions into smaller methods
  - Fix code style violations
- Enhance image capture tool:
  - Add blur detection parameter
  - Support custom image formats and quality
  - Add flexible naming patterns for saved files
- Add comprehensive integration tests for image tool
- Update documentation with new linting commands

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-05-25 18:02:39 +02:00
Peter Steinberger
6396e299be Prepare for v1.0.0-beta.3 release 2025-05-25 14:07:21 +02:00
Peter Steinberger
ed59bb58dc Combine image + analyze 2025-05-25 13:32:39 +02:00
Peter Steinberger
6c2c327a2c Add E2E tests 2025-05-25 03:20:15 +02:00
Peter Steinberger
99acdff66f Add peekaboo cli 2025-05-25 01:26:49 +02:00
Peter Steinberger
670e1c485a Add GitHub Actions CI workflow for Node.js builds
- Configure CI to run on macOS-latest
- Test with Node.js 20.x and 22.x
- Run npm build and tests on push/PR

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-05-25 01:25:35 +02:00