Skip to content

Conversation

@vapi-tasker
Copy link

@vapi-tasker vapi-tasker bot commented Jan 16, 2026

Summary

  • Adds a CLI script to initiate WebSocket voice calls directly from the gitops repo
  • Supports both assistants and squads via explicit -a and -s flags
  • Works with nested resource paths (e.g., company-1/inbound-support)
  • Checks microphone permissions at startup (prompts on macOS, checks ALSA on Linux)
  • Real-time audio I/O via microphone and speakers (with optional dependencies)
  • Displays live transcripts in the terminal
  • Graceful shutdown with Ctrl+C

Usage

# Call an assistant in dev
bun run call:dev -a my-assistant

# Call a nested assistant
bun run call:dev -a company-1/inbound-support

# Call a squad
bun run call:dev -s my-squad

# Call in production
bun run call:prod -a my-assistant

CLI Options

Flag Description
-a <name> Call an assistant by name
-s <name> Call a squad by name

New Files

  • src/call.ts - Main entry point with WebSocket connection, audio handling, permission checks, and CLI parsing

Modified Files

  • package.json - Added call:dev and call:prod scripts, optional mic and speaker dependencies
  • README.md - Added comprehensive documentation for the WebSocket call feature

Permission Check Flow

On startup, the script checks microphone permissions:

  • macOS: Attempts to trigger the system permission prompt using sox/rec
  • Linux: Checks for ALSA recording devices
  • Windows: Informs user they may be prompted

If permission cannot be verified, the user is asked whether to continue.

Audio Dependencies

The audio dependencies (mic, speaker) are marked as optional. The script works without them but will only show transcripts (no audio I/O). Users can install them with:

npm install mic speaker

# macOS may require:
brew install sox

Test plan

  • Run npm install to install dependencies
  • Run bun run call:dev -a <assistant-name> and verify:
    • Permission check runs on first invocation
    • Call is created successfully
    • WebSocket connects
    • Transcripts appear in terminal
    • Ctrl+C gracefully ends the call
  • Test with nested assistant path (e.g., company-1/inbound-support)
  • Test squad call: bun run call:dev -s <squad-name>
  • Test error cases:
    • Invalid assistant name shows helpful error with available assistants
    • Missing state file shows helpful error
    • Using both -a and -s shows error

Closes VAP-11241

🤖 Generated with Claude Code

vapi-tasker bot and others added 4 commits January 16, 2026 19:51
Adds the ability to initiate websocket calls directly from the gitops repo
to test assistants and squads in real-time.

Usage:
  bun run call:dev <assistant-name>
  bun run call:prod <assistant-name>
  bun run call:dev <squad-name> --squad

Features:
- Supports both assistants and squads
- Works with nested paths (e.g., company-1/inbound-support)
- Real-time audio I/O via microphone and speakers
- Displays transcripts in terminal
- Graceful shutdown with Ctrl+C

VAP-11241

Co-Authored-By: Claude <noreply@anthropic.com>
VAP-11241

Co-Authored-By: Claude <noreply@anthropic.com>
- Changed CLI from `--squad` flag to explicit `-a <assistant>` and `-s <squad>` flags
- Added microphone permission check at startup for macOS, Linux, and Windows
- On macOS, attempts to trigger permission prompt before starting call
- User can choose to continue if permission cannot be verified

Usage:
  bun run call:dev -a my-assistant
  bun run call:prod -s my-squad

VAP-11241

Co-Authored-By: Claude <noreply@anthropic.com>
VAP-11241

Co-Authored-By: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant