Commit graph

110 commits

Author SHA1 Message Date
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
Peter Steinberger
54a01ecc46 Fix remaining MCP best practices compliance issues
- Add LICENSE and README.md to npm package files array
- Enhance list tool's server_status as comprehensive info command:
  - Shows MCP version, Swift CLI status and version
  - Displays system permissions (screen recording, accessibility)
  - Lists environment configuration and potential issues
  - Checks log file accessibility
- Implement dynamic version injection for Swift CLI via build script
- Add ESLint configuration (.eslintrc.json) and npm scripts
- Fix critical ESLint issues (console.error, unused imports, prefer-const)
- Add Pino fallback logic when log directory is not writable
- Update default log path to ~/Library/Logs/peekaboo-mcp.log (macOS system log directory)
- Update README to document new log path
- Add Version.swift to .gitignore (auto-generated file)
- Create Version.swift.development for local development
- Add execPeekaboo utility function for simple CLI execution

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-05-27 00:25:21 +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
b9f7e2da7a Release v1.0.0-beta.9 - Updated server status formatting
🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-05-25 22:17:14 +02:00
Peter Steinberger
eeabb3eb20 Tweak tool text 2025-05-25 22:15:13 +02:00
Peter Steinberger
4011a86900 Release v1.0.0-beta.8 - Updated server status formatting 2025-05-25 22:07:37 +02:00
Peter Steinberger
cfc236153a Fix server description 2025-05-25 22:06:50 +02:00
Peter Steinberger
9bc178f74c Release v1.0.0-beta.7 2025-05-25 21:59:58 +02:00
Peter Steinberger
2ac01774b2 Tweak server status 2025-05-25 21:59:03 +02:00
Peter Steinberger
8971795ccc Release v1.0.0-beta.6 - Updated tool descriptions 2025-05-25 21:51:39 +02:00
Peter Steinberger
d0cdd645d3 Better tool formatting 2025-05-25 21:50:38 +02:00
Peter Steinberger
22bc42ac3b Release v1.0.0-beta.5 2025-05-25 21:36:00 +02:00
Peter Steinberger
32bf6b9eaf Release testing 2025-05-25 21:21:53 +02:00
Peter Steinberger
1a5aefeded Prepare for v1.0.0-beta.4 release
- Update CHANGELOG with beta.4 features and fixes
- Add example test script for users
2025-05-25 21:11:31 +02:00
Peter Steinberger
3a9a467308 Fix missing args test to properly capture error output 2025-05-25 21:00:38 +02:00
Peter Steinberger
93a1baf596 Fix Swift CLI integration tests to match actual command structure 2025-05-25 19:41:12 +02:00
Peter Steinberger
61d6ef0cee Fix invalid command test to properly capture error output 2025-05-25 19:38:14 +02:00
Peter Steinberger
7fadd6e5f1 Update invalid command test to match actual Swift CLI behavior 2025-05-25 19:36:15 +02:00
Peter Steinberger
4e640fc297 Fix Swift CLI invalid command test to match actual error output 2025-05-25 19:34:25 +02:00
Peter Steinberger
228ee053b2 Fix JSON structure expectations in Swift CLI tests
- Update to expect success/data wrapper in JSON responses
- Match actual Swift CLI output format
2025-05-25 19:30:43 +02:00
Peter Steinberger
41a43117d6 Remove duplicate errorOutput variable declaration 2025-05-25 19:29:38 +02:00
Peter Steinberger
b51a418ec3 Fix Swift CLI tests in release script
- Replace non-existent server_status command with list apps
- Update command names to match actual Swift CLI (apps not running_applications)
- Fix expected JSON structure to match actual output
2025-05-25 19:29:04 +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
1ff703b185 Add comprehensive binary verification to release script
- Check peekaboo binary exists and is included in package
- Verify binary has executable permissions
- Ensure binary contains both arm64 and x86_64 architectures
- Test binary execution with --help flag
2025-05-25 18:52:39 +02:00
Peter Steinberger
e988a98c70 Add version availability check to release preparation script
- Check if the current version is already published on npm
- Prevent accidental republishing of existing versions
- Run this check early in the release process
2025-05-25 18:50:11 +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
1757503a84 Update all dependencies to latest versions
- pino: 8.21.0 → 9.7.0
- zod: 3.25.23 → 3.25.28
- @types/node: 20.17.50 → 22.15.21
- pino-pretty: 10.3.1 → 13.0.0
- All vitest packages already at latest (3.1.4)

All tests pass with updated dependencies.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-05-25 18:43:16 +02:00
Peter Steinberger
19807ffbd4 Add comprehensive release preparation script
- Add prepare-release.js script that performs all pre-release checks
- Checks git status, dependencies, TypeScript, Swift, and builds
- Runs all tests including integration tests
- Verifies package contents and structure
- Add npm run prepare-release command
- Document in CLAUDE.md

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-05-25 18:38:57 +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
9a7c8d4dfe Release v1.0.0-beta.4
- Add Swift linting and formatting support
- Refactor Swift code for better maintainability
- Enhanced image capture features (blur detection, formats, naming)
- Fix compilation error in ListCommand
- Add comprehensive integration tests

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-05-25 18:17:07 +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
f41e70e23e Add proper tool description and work around a bug in Gemini’s parser 2025-05-25 18:02:05 +02:00
Peter Steinberger
50846a5816
Merge pull request #1 from steipete/dependabot/npm_and_yarn/npm_and_yarn-fc657e729b 2025-05-25 15:39:25 +02:00
dependabot[bot]
f1cc0824a7
Bump the npm_and_yarn group across 1 directory with 4 updates
Bumps the npm_and_yarn group with 4 updates in the / directory: [esbuild](https://github.com/evanw/esbuild), [vitest](https://github.com/vitest-dev/vitest/tree/HEAD/packages/vitest), [@vitest/ui](https://github.com/vitest-dev/vitest/tree/HEAD/packages/ui) and [@vitest/coverage-v8](https://github.com/vitest-dev/vitest/tree/HEAD/packages/coverage-v8).


Updates `esbuild` from 0.21.5 to 0.25.4
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG-2024.md)
- [Commits](https://github.com/evanw/esbuild/compare/v0.21.5...v0.25.4)

Updates `vitest` from 1.6.1 to 3.1.4
- [Release notes](https://github.com/vitest-dev/vitest/releases)
- [Commits](https://github.com/vitest-dev/vitest/commits/v3.1.4/packages/vitest)

Updates `@vitest/ui` from 1.6.1 to 3.1.4
- [Release notes](https://github.com/vitest-dev/vitest/releases)
- [Commits](https://github.com/vitest-dev/vitest/commits/v3.1.4/packages/ui)

Updates `@vitest/coverage-v8` from 1.6.1 to 3.1.4
- [Release notes](https://github.com/vitest-dev/vitest/releases)
- [Commits](https://github.com/vitest-dev/vitest/commits/v3.1.4/packages/coverage-v8)

---
updated-dependencies:
- dependency-name: esbuild
  dependency-version: 0.25.4
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: vitest
  dependency-version: 3.1.4
  dependency-type: direct:development
  dependency-group: npm_and_yarn
- dependency-name: "@vitest/ui"
  dependency-version: 3.1.4
  dependency-type: direct:development
  dependency-group: npm_and_yarn
- dependency-name: "@vitest/coverage-v8"
  dependency-version: 3.1.4
  dependency-type: direct:development
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-25 12:08:45 +00:00