Commit graph

49 commits

Author SHA1 Message Date
Peter Steinberger
8145455fc4 add tests for path handling 2025-06-08 03:48:49 +01:00
Peter Steinberger
0c4706393e Improve output path handling 2025-06-08 03:48:33 +01:00
Peter Steinberger
e2eef703a6 Improve error handling 2025-06-08 03:48:19 +01:00
Peter Steinberger
10672e57c0 Prepare v1.0.0-beta.15: Improved list tool usability and robustness
### Improved
- The list tool is now more lenient and user-friendly
- item_type parameter is now optional (defaults to 'running_applications')
- Intelligent auto-detection when app parameter is provided
- Enhanced error handling and validation

### Fixed
- Fixed crash when list tool called with empty item_type
- Improved image tool path handling for temporary files
- Better error messages and validation throughout

### Tests
- Added comprehensive test coverage for new list tool features
- Enhanced integration tests for improved scenarios
- Total test count increased from 223 to 228 tests

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-08 02:36:13 +01:00
Peter Steinberger
dc0b29b0b1 fix: resolve Swift test compilation issue with allSatisfy closure 2025-06-08 02:03:45 +01:00
Peter Steinberger
68b5f6eca7 style: apply SwiftFormat changes 2025-06-08 02:03:33 +01:00
Peter Steinberger
d5df3ec53e fix: Swift test compilation error with allSatisfy closure 2025-06-08 02:03:17 +01:00
Peter Steinberger
c9ac341e08 style: apply SwiftFormat final formatting 2025-06-08 02:02:37 +01:00
Peter Steinberger
3bb05942a7 chore: bump version to 1.0.0-beta.14 2025-06-08 02:01:27 +01:00
Peter Steinberger
fbf32f8e21 Prepare for beta.14 release: comprehensive test improvements and code cleanup
- Fixed all Swift test compilation errors and SwiftLint violations
- Enhanced test host app with permission status display and CLI availability checking
- Refactored ImageCommand.swift to improve readability and reduce function length
- Updated all tests to use proper Swift Testing patterns
- Added comprehensive local testing framework for screenshot functionality
- Updated documentation with proper test execution instructions
- Applied SwiftFormat to all Swift files and achieved zero serious linting issues

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-08 02:00:44 +01:00
Peter Steinberger
f5ad072bc8 chore: bump version to 1.0.0-beta.13 2025-06-08 01:28:12 +01:00
Peter Steinberger
5ff72d1877 fix: Swift test compilation error 2025-06-08 00:48:37 +01:00
Peter Steinberger
8bbacfae75 style: apply SwiftFormat changes 2025-06-08 00:47:52 +01:00
Peter Steinberger
6597b12e3c Fix TypeScript test error message expectation 2025-06-08 00:27:12 +01:00
Peter Steinberger
c5ee0e1806 Fix Swift test compilation errors and test failures 2025-06-08 00:25:56 +01:00
Peter Steinberger
e894210dbd Apply SwiftFormat and fix all SwiftLint violations
- Run SwiftFormat on all Swift files for consistent formatting
- Fix all critical SwiftLint violations:
  * Replace count > 0 with \!isEmpty
  * Use descriptive variable names instead of i, x, y
  * Replace % operator with isMultiple(of:)
  * Fix force try violations
  * Use trailing closure syntax
  * Replace for-if patterns with for-where
  * Fix line length violations
  * Use Data(_:) instead of .data(using:)\!
- Ensure zero SwiftLint errors for clean code quality

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-08 00:18:23 +01:00
Peter Steinberger
45f087496a Fix Swift build by renaming Version.swift.development to Version.swift
🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-07 23:58:59 +01:00
Peter Steinberger
b1ddf6f1b6 Enhance Swift testing framework and test coverage
- Update CI configuration to use macOS-15 runner with Xcode 16.3
- Expand test coverage with comprehensive new test suites:
  * JSONOutputTests.swift - JSON encoding/decoding and MCP compliance
  * LoggerTests.swift - Thread-safe logging functionality
  * ImageCaptureLogicTests.swift - Image capture command logic
  * TestTags.swift - Centralized test tagging system
- Improve existing tests with Swift Testing patterns and async support
- Make Logger thread-safe with concurrent dispatch queue
- Add performance, concurrency, and edge case testing
- Fix compilation issues and optimize test performance

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-07 23:57:26 +01:00
Peter Steinberger
5c4cdbc7d5 Apply SwiftFormat to test files 2025-06-07 23:03:13 +01:00
Peter Steinberger
ebbb75ef1b Fix Swift tests after error handling improvements 2025-06-07 23:02:41 +01:00
Peter Steinberger
94c09b1c7a Apply SwiftFormat changes 2025-06-07 22:58:07 +01:00
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