How mohit-pjcts/hacku works
Backstage is a local, voice- and text-driven desktop assistant with separate macOS and Windows engines. Its main workflow routes an utterance to either an app-changing job or a read-only screen question; jobs are planned into per-app agents that observe, decide, act and verify, while questions produce spoken answers and screen annotations. The graph preserves both platform implementations and documented capabilities. Several links reflect the README rather than sampled implementation details; those are cited there.
Main entry points: src/server.ts Windows server · loop.ts Mac agent loop · agent.ts Windows agent · src/server.ts Mac server
Components 28
Job orchestration
- Mac router
mac/src/router.ts - Windows router
windows/src/router.ts - Mac planner and dispatcher
mac/src/manager.ts - Windows planner
windows/src/planner.ts - Mac agent loop
mac/src/loop.ts - Windows agent
windows/src/agent.ts - Mac perception
mac/src/perceive.ts - Windows lanes
windows/src/lanes.ts - Task results
mac/src/results.ts - File skills and operations
windows/src/files.ts
App interaction
- Mac Cua driver
mac/src/driver.ts - Windows Cua driver
windows/src/driver/win.ts - Mac fast lane
mac/native/FastLane.swift - Windows fast lane
windows/src/fastlane.ts
Screen answers
- Mac explain mode
mac/src/explain.ts - Windows explain mode
windows/src/explain.ts - Mac overlay
mac/overlay/Overlay.swift - Windows overlay
windows/src/overlay.ts
Platform runtime
- Local panel
- Mac server
mac/src/server.ts - Windows server
windows/src/server.ts - Mac voice
mac/src/voice.ts - Windows voice intake
windows/src/intake/index.ts - Windows speech output
windows/src/speak.ts
Other components
- User
- TypeSafe jev
- Claude
- User apps
Connections 38
- User → Mac overlay: speaks or types
- User → Windows overlay: speaks or types
- Mac overlay → Mac server: sends input
- Windows overlay → Windows server: sends input
windows/src/server.ts - Local panel → Mac server: sends commands
- Local panel → Windows server: sends commands
- Mac server → Mac router: routes utterance
mac/src/server.ts - Windows server → Windows router: routes utterance
windows/src/server.ts - Mac router → Mac planner and dispatcher: dispatches jobs
mac/src/server.ts - Windows router → Windows server: routes jobs
windows/src/server.ts - Windows server → Windows planner: requests plans
windows/src/server.ts - Mac planner and dispatcher → Mac agent loop: runs agents
mac/src/manager.ts - Windows server → Windows agent: runs tasks
windows/src/server.ts - Mac agent loop → Mac perception: perceives controls
- Windows agent → Windows lanes: uses action lanes
- Mac agent loop → TypeSafe jev: requests decisions
- Windows agent → TypeSafe jev: requests decisions
- Mac planner and dispatcher → Claude: plans open tasks
mac/src/manager.ts - Mac agent loop → Claude: checks borderline steps
- Windows agent → Claude: plans or checks
- Mac agent loop → Mac Cua driver: acts through
- Windows agent → Windows Cua driver: acts through
- Mac Cua driver → Mac fast lane: uses fast lane
- Windows Cua driver → Windows fast lane: uses fast lane
windows/src/driver/win.ts - Mac Cua driver → User apps: controls windows
- Windows Cua driver → User apps: controls windows
windows/src/driver/win.ts - Mac router → Mac explain mode: routes questions
mac/src/server.ts - Windows router → Windows explain mode: routes questions
windows/src/router.ts - Mac explain mode → Claude: asks about screen
- Windows explain mode → Claude: asks about screen
- Mac explain mode → Mac overlay: draws annotations
- Windows explain mode → Windows overlay: draws annotations
- Mac explain mode → Mac voice: speaks answers
- Windows explain mode → Windows speech output: speaks answers
- Mac overlay → Mac server: sends voice text
- Windows voice intake → Windows server: sends voice events
windows/src/main.ts - Mac server → Task results: reports outcomes
mac/src/server.ts - Mac planner and dispatcher → File skills and operations: compiles file skills