Files
paseo/packages/server
Mohamed Boudra 988cf4bec8 fix(acp): keep Antigravity turn open while non-daemon background tools run (#10310)
* fix(acp): keep Antigravity turn open while non-daemon background tools run

* fix(acp): address deferred turn steer, drain race, and echo scoping

* fix(acp): serialize deferred steers, gate on end_turn, and lock canceled tool updates

* fix(acp): unify deferred reply settlement and accept queued steers on send

* fix(acp): keep Stop unblocked during queued steers and gate reply settlement on post-tool updates

* fix(acp): ignore in-flight steer usage for settlement and deliver queued steers after RPC errors

* fix(acp): keep deferred background job running when a steer rejects and honor Stop cancellation

* fix(acp): settle deferred turn immediately on Stop even if a steer RPC is unanswered

* fix(acp): bound Stop drain for in-flight steers and tear down wedged runtimes

* fix(acp): terminate wedged child process on Stop timeout and reject prompts on closed sessions

* fix(acp): reject replacement prompt if session retires during interrupt and preserve streaming reply id

* fix(acp): always retire deferred ACP session cleanly on Stop and clear fallback id on steer start

* fix(server): reopen retired plugin sessions before applying configuration changes

* fix(acp): close deferred process before emitting cancel and synchronize mid-shutdown config changes

* fix(acp): do not reset deferred settle timer on excluded daemon tool updates

* fix(acp): release deferred turn when tool is reclassified as excluded

* fix(acp): gate deferred settlement reset on open qualifying tool membership

* fix(acp): decouple deferred reply tracking from open tool blockers

* fix(acp): track post-end_turn wire order and preserve settled reply across tool completion

* fix(acp): unify wire-order prompt response tracking and exclude daemon reclassification from crossedEndTurn

* fix(acp): preserve settled background reply across steers that start no new tools

* fix(acp): distinguish settled-with-open-tools reply state across steers

* fix(acp): share close and deferred interrupt retirement across overlapping calls

* fix(acp): make deferred retirement sole owner of prompt rejection and cancellation

* fix(acp): centralize session retirement in retireSession so rejected prompts never suppress session.closed

* fix(acp): bound session/cancel write in deferred retirement before teardown

* fix(acp,server): force-abort stalled connectors on Stop timeout and bound cancel wait in AgentManager

* fix(acp,server): enforce shutdown deadline on connector close and bound settings wait on queued Stop

* fix(acp): scope connector shutdown deadline to deferred retirement and finalize on late close
2026-11-21 13:27:45 +07:00
..
2026-04-23 21:44:48 +07:00

Voice Assistant

A voice-controlled terminal assistant that runs as a single local service.

Quick Start

# Install dependencies
npm install

# Copy environment variables
cp .env.example .env
# Edit .env and add your API keys (OpenAI, Deepgram)

# Run development servers
npm run dev

# Open browser to http://localhost:5173

Architecture

  • Express Server (port 3000) - Serves API and built UI in production
  • Vite Dev Server (port 5173) - Hot-reload React UI in development
  • WebSocket (/ws) - Real-time bidirectional communication
  • Agent - STT → LLM → TTS pipeline with terminal control
  • Daemon - tmux-based terminal management (in-process)

Development

# Run both servers (recommended)
npm run dev

# Or run separately:
npm run dev:server  # Express on port 3000
npm run dev:ui      # Vite on port 5173

# Type checking
npm run typecheck

# Build for production
npm run build

# Start production server
npm start

Project Status

✅ Completed (Phases 1-2):

  • Package setup and configuration
  • Express server with WebSocket
  • React UI with Vite
  • WebSocket client with ping/pong testing

⏳ In Progress (Phase 3):

  • Terminal control (tmux integration)

📋 Planned (Phases 4-9):

  • LLM integration (OpenAI GPT-4)
  • Agent orchestrator
  • Speech-to-Text (Deepgram)
  • Text-to-Speech (OpenAI)
  • Audio streaming
  • UI polish

See IMPLEMENTATION_PLAN.md for complete details.

Environment Variables

OPENAI_API_KEY=your-openai-key-here      # GPT-4 and TTS
DEEPGRAM_API_KEY=your-deepgram-key-here  # Streaming STT
STT_MODEL=whisper-1        # Optional: override to gpt-4o-transcribe, etc.
STT_CONFIDENCE_THRESHOLD=-3.0  # Optional: reject low-confidence clips
STT_DEBUG_AUDIO_DIR=.stt-debug # Optional: persist raw dictation audio for debugging
PASEO_HOME=~/.paseo        # Runtime state directory (agents/, etc.)
PASEO_LISTEN=127.0.0.1:6767  # Listen address (host:port or /path/to/socket)

PASEO_HOME defaults to ~/.paseo and isolates runtime artifacts like agents/. PASEO_LISTEN controls the daemon listen address. For blue/green testing you can run a parallel server without touching production state:

PASEO_HOME=~/.paseo-blue PASEO_LISTEN=127.0.0.1:7777 npm run dev

Tech Stack

  • Server: Express, TypeScript, ws (WebSocket)
  • Client: React 18, Vite, TypeScript
  • Terminal: tmux (via child_process)
  • AI: OpenAI (LLM + TTS), Deepgram (STT)

Testing

Currently manual testing via:

  1. Start servers: npm run dev
  2. Open http://localhost:5173
  3. Test WebSocket connection (green status indicator)
  4. Click "Send Ping" button to test communication

More testing guidance as features are implemented.

License

MIT