feat: add WebSocket call script for assistants and squads#3
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
-aand-sflagscompany-1/inbound-support)Usage
CLI Options
-a <name>-s <name>New Files
src/call.ts- Main entry point with WebSocket connection, audio handling, permission checks, and CLI parsingModified Files
package.json- Addedcall:devandcall:prodscripts, optionalmicandspeakerdependenciesREADME.md- Added comprehensive documentation for the WebSocket call featurePermission Check Flow
On startup, the script checks microphone permissions:
sox/recIf 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 soxTest plan
npm installto install dependenciesbun run call:dev -a <assistant-name>and verify:company-1/inbound-support)bun run call:dev -s <squad-name>-aand-sshows errorCloses VAP-11241
🤖 Generated with Claude Code