Commit graph

257 commits

Author SHA1 Message Date
Peter Steinberger
76d0faef42 image + analyze keeps the temp files 2025-06-08 04:02:04 +01:00
Peter Steinberger
ee6aecda82 update docs 2025-06-08 03:49:54 +01:00
Peter Steinberger
b8fd8870dd more lenient tool handling 2025-06-08 03:49:46 +01:00
Peter Steinberger
bc834f977a better path handling 2025-06-08 03:49:23 +01:00
Peter Steinberger
e5e8123445 add more tests 2025-06-08 03:49:11 +01:00
Peter Steinberger
3ce1d38050 improve path resolve logic 2025-06-08 03:49:04 +01:00
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
4f674e82b5 chore: update package-lock.json for v1.0.0-beta.15 2025-06-08 02:36: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
c5e1adf7ff docs: add Cursor IDE install button for easier MCP setup 2025-06-08 02:13:10 +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
d621bf5a00 docs: add changelog entry for version 1.0.0-beta.14 2025-06-08 02:02:15 +01:00
Peter Steinberger
ef2f18cd99 chore: update package-lock.json for version 1.0.0-beta.14 2025-06-08 02:01:49 +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
7976495b27 chore: bump version to 1.0.0-beta.12 2025-06-08 00:47:31 +01:00
Peter Steinberger
db02bc2c08 Fix TypeScript integration tests by building Swift CLI first on CI 2025-06-08 00:36:30 +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
27f229e802 Fix linting issues in peekaboo-cli.ts 2025-06-07 22:57:49 +01:00
Peter Steinberger
bb2f0f8401 Update package-lock.json for v1.0.0-beta.11 2025-06-07 22:56:52 +01:00
Peter Steinberger
4e5e15c5a5 Prepare for 1.0.0-beta.11 release
- Update version to 1.0.0-beta.11 in package.json and Swift version file
- Update CHANGELOG.md with today's date
- Fix test expectations for new error message format
- Build universal Swift binary with latest changes

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-07 22:56:33 +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
bd49a9c772 Fix SwiftFormat/SwiftLint consistency
- Generate enum instead of struct in build script
- Prevents formatting conflicts during release process
- Maintains alignment with SwiftFormat enumNamespaces rule
2025-05-27 01:30:32 +02: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
4636aec9d4 Fix test expectation for unknown type fallback
Changed from 'any' to 'string' to match the updated implementation

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-05-27 01:11:10 +02:00
Peter Steinberger
4be8c69e77 Fix TypeScript compilation errors
- Added missing imports for ToolResponse and z in index.ts
- Added missing imports for WindowInfo and TargetApplicationInfo in list.ts
- Fixed type casting for ImageCaptureData in image.ts
- Added proper return type annotations to handlers
- Fixed content array metadata type to Record<string, unknown>
- Added const assertions for all 'text' type literals
- Fixed return types for helper functions in list.ts
- Added minItems and maxItems to JSONSchema interface

All TypeScript compilation errors resolved

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-05-27 01:10:35 +02:00
Peter Steinberger
cbecd6181d Fix all ESLint warnings
- Fixed long lines by splitting template literals
- Replaced all 'any' types with proper types:
  - Used ToolResponse type instead of any
  - Used z.ZodError for Zod validation errors
  - Created JSONSchema interface for zod-to-json-schema
  - Added ServerStatusData interface
  - Used Record<string, unknown> for metadata
  - Created ZodDefAny type for internal Zod properties
- Fixed quote style to use double quotes
- Removed trailing spaces

All ESLint issues resolved (0 errors, 0 warnings)

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-05-27 01:03:36 +02:00
Peter Steinberger
9295dd1ed0 Fix server status test by properly mocking fs module
- Mock fs.readFile in beforeEach to return valid package.json
- Mock fs module with existsSync and accessSync for CLI checks

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-05-27 00:44:33 +02:00
Peter Steinberger
b640074c33 Fix ESLint errors in image-summary.ts
- Remove unused variables target and mode
- Fix quote style to use double quotes

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-05-27 00:43:34 +02:00
Peter Steinberger
c6abc9d168 Fix test failures after refactoring
- Fix buildSwiftCliArgs import in image tests
- Update buildSwiftCliArgs to match expected behavior (capture-focus default, warning messages)
- Fix image summary builder logic to properly generate summaries
- Update server status test to match new implementation that doesn't use executeSwiftCli

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-05-27 00:42:46 +02:00
Peter Steinberger
35083b18cc Update ESLint config to handle caught errors pattern
🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-05-27 00:36:10 +02:00
Peter Steinberger
68f3997b5b Prepare for v1.0.0-beta.10 release
- Update version in package.json
- Update package-lock.json
- Add comprehensive changelog entry for beta.10

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-05-27 00:35:39 +02:00
Peter Steinberger
44364221d6 Complete MCP best practices compliance and code cleanup
- Fix all critical ESLint errors (unused variables, wrong types)
- Split image.ts into smaller modules for better maintainability:
  - image-analysis.ts: AI provider analysis logic
  - image-summary.ts: Summary text generation
  - image-cli-args.ts: Swift CLI argument building
- Reduce image.ts from 472 to 246 lines
- Add proper TypeScript types throughout (reduce 'any' usage)
- Fix logger type imports and use proper Pino Logger type
- Update ESLint to ignore test files (handled by vitest)
- Clean up all trailing spaces and formatting issues
- Export buildSwiftCliArgs for test compatibility

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-05-27 00:32:54 +02:00