Files
James MaesandClaude Opus 4.7 b9c9f0e4d3 P3-APP + P3-HUD: macOS .app bundle with reactive JARVIS HUD
Pivots from a SwiftPM executable to a real macOS .app bundle so we
get an NSApplication run loop on the main thread (required for
NSEvent global key monitors, AVSpeech delegate callbacks, and SwiftUI
windowing — none of which work cleanly in a CLI binary on Swift 6).

App structure (mirrors MetalPOC):
  - Sources/App/main.swift       — NSApplication.shared.run() entry
  - Sources/App/AppDelegate.swift — @MainActor owner of all subsystems
  - project.yml                   — XcodeGen, references local SwiftPM
                                    package (renamed VoicePOC →
                                    VoicePOCKit to avoid name collision
                                    between library product + app)
  - scripts/run-app.sh            — xcodegen + xcodebuild + launch

Reactive JARVIS HUD (Max-Headroom-style):
  - Sources/VoicePOC/HUD/JarvisHUDState.swift  — @Observable state
  - Sources/VoicePOC/HUD/JarvisHUDView.swift   — SwiftUI orb + captions
  - Sources/VoicePOC/HUD/JarvisHUDWindow.swift — borderless always-on-top
    translucent window in bottom-right of primary screen
  - Color codes state: cyan (listening) / amber (thinking) / magenta
    (speaking) / dim gray (idle)
  - Orb pulses in size + glow with TTS word boundaries
  - Two caption rows show last user utterance + last JARVIS reply
  - 30 Hz decay timer pulls intensity back down between word pulses

AVSpeechTTS pulse callbacks:
  - onSpeakingStart  → bumps HUD intensity to 0.9
  - onSpeakingPulse  → fires per-word boundary, bumps intensity +0.55
  - onSpeakingEnd    → drops intensity to 0

ConversationCoordinator now stores most recent transcript + response
strings (`lastTexts()`) so the HUD can show captions.

Package.swift: VoicePOC library renamed to VoicePOCKit to avoid an
Xcode build conflict where the app target and the library product
both wanted to write VoicePOC.swiftmodule to the same path. All
test imports updated.

Run:
  ./scripts/run-app.sh

The script regenerates the xcodeproj, builds Debug, and launches the
.app's executable directly so you see stdout in the launching terminal.

Build verified: ** BUILD SUCCEEDED **
20 tests, 5 skipped (live-mode), 0 failures.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-17 18:25:13 -05:00
..