How anhsirksai/ghostwatch works
GhostWatch lets spectators submit a wish, watch and steer an AI coding agent, and open the app it publishes from a cloud VM. The durable Ghost actor holds séance state and spectator curses; a supervisor starts or resumes the worker, which uses an OpenAI agent and a guarded VM vessel to build and publish the result. The README also documents mock/offline rehearsal. Edges are limited to relationships shown in the excerpts or README; unsampled UI wiring and tool details are not inferred.
Main entry points: ghost.ts Haunt worker · actors.ts Ghost actor · server.ts Bun server · vm.ts VM vessel
Components 14
Séance interface
- Séance UI
client/public/index.html - Bun server
client/server.ts
Durable coordination
- Supervisor
client/server.ts - Ghost actor
actor/src/actors.ts - Terse actor service
Agent and safety
- Haunt worker
client/ghost.ts - OpenAI
- Exorcist checks
actor/src/exorcist.ts
VM and publishing
- VM vessel
client/vm.ts - Freestyle VM
- Mock vessel
client/vm.ts - Published app
Other components
- Spectators
- Portal visitors
Connections 17
- Spectators → Séance UI: use
README.md - Séance UI → Bun server: request page
README.md - Spectators → Ghost actor: wish and curse
README.md - Ghost actor → Spectators: sync séance
README.md - Bun server → Terse actor service: prepare socket URL
client/server.ts - Supervisor → Terse actor service: read actor state
client/server.ts - Supervisor → Haunt worker: start or resume
client/server.ts - Haunt worker → Ghost actor: read and update state
client/ghost.ts - Ghost actor → Exorcist checks: screen curses
actor/src/actors.ts - Haunt worker → Exorcist checks: screen actions
client/ghost.ts - Haunt worker → OpenAI: request tool calls
client/ghost.ts - Haunt worker → VM vessel: execute build tools
client/ghost.ts - VM vessel → Freestyle VM: exec, write, publish
client/vm.ts - VM vessel → Mock vessel: use without key
client/vm.ts - Haunt worker → Ghost actor: store preview URL
client/ghost.ts - Portal visitors → Published app: open public URL
README.md - Bun server → Mock vessel: serve mock portal
client/server.ts