Commit graph

10 commits

Author SHA1 Message Date
Peter Steinberger
e9e2cdb6cb Improve error handling when no windows are available 2025-06-08 04:05:52 +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
27f229e802 Fix linting issues in peekaboo-cli.ts 2025-06-07 22:57: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
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
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
6396e299be Prepare for v1.0.0-beta.3 release 2025-05-25 14:07:21 +02:00
Peter Steinberger
bda349ea29 Improve error messages 2025-05-25 02:27:19 +02:00
Peter Steinberger
857ce73b94 rename swift-cli to peekaboo-cli 2025-05-25 01:28:06 +02:00
Renamed from src/utils/swift-cli.ts (Browse further)