Commit Graph

32 Commits

Author SHA1 Message Date
Peter Steinberger
ffcfaa052d feat: Add explicit communication instructions for o3 model
- Enhanced system prompt to explicitly request thinking out loud
- Added instructions for models to share their reasoning process
- Increased temperature for o3 model to encourage more verbose output
- Set maxTokens to 4096 to ensure room for explanations

This should help make o3's thought process visible to users.
2025-07-26 17:31:26 +02:00
Peter Steinberger
310a5e71a9 fix: Improve Poltergeist reliability and concurrent build handling
- Enhanced stop_watcher to properly remove both trigger and watch
- Added SwiftPM conflict detection to prevent concurrent build issues
- Improved status messages with success/warning indicators
- Fixed issue where Poltergeist wouldn't properly restart after stopping

The watcher now handles edge cases better and provides clearer feedback about its state.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-26 17:11:41 +02:00
Peter Steinberger
ad52f12ac3 feat: Improve agent system prompt and add 'see' tool
- Enhanced system prompt with explicit screenshot-after-launch guidance
- Added comprehensive AppleScript quoting rules and examples
- Strengthened task completion requirements with checklist
- Added dialog handling best practices
- Introduced new 'see' tool that combines screenshot + UI detection
- Updated CLI agent command to support 'see' tool with proper emoji
- Fixed compilation issues with DetectedElements

This improves agent's ability to handle app dialogs, complete all task
requirements (including specific output phrases), and use proper
AppleScript syntax.
2025-07-26 17:03:57 +02:00
Martin Schürrer
b0d4777023
Add build staleness detection for debug CLI (#30)
* feat: Add build staleness detection for debug CLI

- Add debug-only staleness check using git config 'peekaboo.check-build-staleness'
- CLI will exit with error if current git commit differs from build commit
- Helps prevent Claude Code from using outdated binaries after source changes

* feat: Enhance build staleness detection with file modification checks

- Add buildDate timestamp to Version.swift generation
- Create separate BuildStalenessChecker.swift file
- Add comprehensive file modification time checking using git status
- Parse git status --porcelain=1 output to identify modified files
- Compare file modification times against build timestamp
- Provide clear error messages for both commit and file staleness
- Support clean/comprehensive staleness detection for Claude Code workflows

* docs: Add Debug Build Staleness Detection section to README

- Document how to enable/disable staleness checking via git config
- Explain both git commit and file modification staleness detection
- Provide clear examples and benefits
- Highlight usefulness for AI-assisted development workflows

* docs: Simplify staleness detection README section

Replace verbose documentation with single concise paragraph as requested

* fix: Remove test comments from main.swift

Clean up debugging comments that were accidentally left in the code

* Update Apps/CLI/Sources/peekaboo/main.swift
2025-07-26 15:37:22 +02:00
Peter Steinberger
3dc9d2d2b6 feat: Add git version info to CLI help menu
- Modified build scripts to extract git commit, date, branch, and dirty state
- Enhanced Version.swift with fullVersion property containing git metadata
- Updated help menu to display version with git info (branch/commit, date)
- Created build-swift-debug.sh for quick debug builds with version info
- Now shows version like: Peekaboo 3.0.0-beta.1 (spec-v3/6c4adea, 2025-07-26 04:00:23 +0200)

This makes it easy to verify if running the latest version based on git commit.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-26 15:02:22 +02:00
Peter Steinberger
1e657b5c34 feat: Add comprehensive Playground test app with logging utility
- Created SwiftUI test app at Playground/ for testing all Peekaboo automation features
- Includes comprehensive UI elements: clicks, text input, controls, gestures, drag/drop, keyboard
- Added OSLog integration with categorized logging (Click, Text, Menu, Window, etc.)
- Created playground-log.sh utility inspired by vtlog for easy log viewing
- Features: color-coded output, category filtering, search, JSON export, time ranges
- Added wrapper script at scripts/playground-log.sh for project root access
- Updated CLAUDE.md with comprehensive Playground documentation
- All UI elements have accessibility identifiers for automation testing

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-26 15:02:21 +02:00
Peter Steinberger
d5b170adf9 feat: Reorganize repository structure for better code organization
- Move core libraries to Core/ directory (PeekabooCore, AXorcist)
- Move applications to Apps/ directory (Mac, CLI)
- Move TypeScript server to Server/ directory
- Move scripts to Scripts/ directory
- Archive deprecated PeekabooInspector (now integrated into Mac app)
- Update all build configurations and paths
- Update CI/CD workflows for new structure
- Fix build scripts to use new paths

This reorganization provides:
- Clear separation between core libraries, apps, and server
- Flattened Mac app structure (removed double nesting)
- Consistent naming conventions
- Better code sharing through PeekabooCore
- Easier maintenance and development
2025-07-26 15:02:20 +02:00
Peter Steinberger
f0c50f0890 feat: Add vtlog utility for unified logging access
- Adopted vtlog script from VibeTunnel project for PeekabooInspector
- Configured to work with com.steipete.PeekabooInspector subsystem
- Added comprehensive documentation to CLAUDE.md
- Provides easy access to macOS unified logging output with filtering options

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-26 15:02:19 +02:00
Peter Steinberger
7fa67c4dfa fix: Keep "Peekaboo" prefix in version string for Homebrew compatibility
Homebrew expects the version string to include the "Peekaboo" prefix.
This commit:
- Reverts the version generation to include "Peekaboo" prefix
- Updates all version tests to expect the prefix format
- Ensures compatibility with Homebrew's version requirements

All tests now pass with the expected format: "Peekaboo X.Y.Z"
2025-07-04 12:10:15 +01:00
Peter Steinberger
b9844f9144 fix: Remove "Peekaboo" prefix from version string
The Swift tests expect Version.current to contain only the semantic version
number (e.g. "2.0.3") without the "Peekaboo" prefix. This was causing the
version format tests to fail in CI.

- Updated build-swift-universal.sh to inject only the version number
- Regenerated Version.swift with the correct format
- All version tests now pass
2025-07-04 12:10:15 +01:00
Peter Steinberger
fe5fe8a8cc Release v2.0.3: Fix version output for Homebrew compatibility
- Updated CLI to output "Peekaboo X.X.X" instead of just version number
- Fixes Homebrew formula test that expects "Peekaboo" in --version output
- No functional changes, just formatting improvement
2025-07-03 23:24:10 +01:00
Peter Steinberger
19fd2ae436 Release v2.0.2: Properly fix macOS Sequoia 26 compatibility
- Actually fixed LC_UUID load command generation (v2.0.1 fix was incomplete)
- Binary now includes LC_UUID for both x86_64 and arm64 architectures
- Verified with otool that LC_UUID is present in the universal binary
- This ensures proper dyld loading on macOS 26+
2025-07-03 23:12:39 +01:00
Peter Steinberger
c6adedd410 Release v2.0.1: Fix macOS Sequoia 26 compatibility
- Fixed LC_UUID load command preservation during binary stripping
- Updated strip command to use -u flag to retain UUID for macOS 26+ compatibility
- Ensures proper debugging and crash reporting support on newer macOS versions
2025-07-03 22:54:57 +01:00
Peter Steinberger
cfcc235922
feat: Add AI analysis capability directly to Swift CLI (#20) 2025-07-03 22:09:25 +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
731b89b779 Prepare release 2025-05-27 00:21:29 +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
32bf6b9eaf Release testing 2025-05-25 21:21:53 +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
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
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
857ce73b94 rename swift-cli to peekaboo-cli 2025-05-25 01:28:06 +02:00
Peter Steinberger
eab4e5a394 Add build dir, prepare package 2025-05-23 05:57:06 +02:00