Migrated from /mnt/backup/home/viky/Code/services/speech-service/ - Renamed packages from @speech-service/* to @venus/speech-* - Removed git submodule dependencies - Stubbed SpellChecker for now - Ready for integration with @venus @agents Features: - Piper TTS with streaming support - STT service - WebSocket server - Voice discovery - React showcase UI 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| oneoffs | ||
| platform-integrated-runner.ts | ||
| platform-runner.ts | ||
| README.md | ||
| run-backend.ts | ||
| run-showcase.ts | ||
Platform-Integrated Service Runners
This directory contains service runners that follow the architecture patterns from the platform's @service-runners packages, providing robust service management for the speech service.
Files
platform-runner.ts
Basic orchestrator with built-in port allocation, process management, and health monitoring. This demonstrates the core patterns from the platform without requiring platform dependencies.
Usage:
tsx scripts/platform-runner.ts
Features:
- Automatic port allocation with conflict resolution
- Health monitoring for service readiness
- Coordinated lifecycle management
- Graceful shutdown handling
platform-integrated-runner.ts
Advanced runner that can detect and use platform @service-runners if available, falling back to built-in orchestration otherwise.
Usage:
tsx scripts/platform-integrated-runner.ts
Features:
- Platform runner detection
- Configuration-driven service setup
- Fallback to built-in orchestration
- Service configuration management
run-backend.ts
Standalone backend runner module following platform patterns. Can be used independently or integrated with other runners.
Usage:
# With default configuration
tsx scripts/run-backend.ts
# With custom configuration
tsx scripts/run-backend.ts --config '{"name":"my-backend","preferredPort":3000}'
Features:
- Port allocation and management
- Writes
.ports.jsonfor service discovery - Environment variable configuration
- Watch mode with auto-restart
run-showcase.ts
Showcase UI runner that integrates with the backend service via port discovery.
Usage:
# Auto-detect backend from .ports.json
tsx scripts/run-showcase.ts
# Specify backend port explicitly
tsx scripts/run-showcase.ts --backend-port 31770
# Custom showcase port
tsx scripts/run-showcase.ts --showcase-port 5000
# Disable port file watching
tsx scripts/run-showcase.ts --no-watch
Features:
- Automatic backend discovery
- Port file monitoring
- Proxy configuration
- Change detection warnings
Integration with Platform
These runners demonstrate patterns from the platform's service management infrastructure:
From @service-runners/core:
- PortAllocator: Automatic port allocation with conflict resolution
- ProcessManager: Lifecycle management for child processes
- HealthMonitor: Service health checking and readiness detection
- ServiceRunnerCore: Base patterns for service runners
From @service-runners/vite-runner:
- Vite-specific configuration management
- Proxy setup for backend integration
- Error parsing and reporting
- Development server optimization
From @service-runners/node-runner:
- Node.js service management
- TypeScript execution with tsx
- Watch mode configuration
- Environment variable handling
Benefits
- Robust Port Management: No more port conflicts or hardcoded ports
- Service Coordination: Services start in correct order with health checks
- Graceful Shutdown: Proper cleanup on exit
- Error Handling: Structured error reporting and recovery
- Platform Standards: Follows established patterns for consistency
Migration Path
To fully integrate with platform runners:
-
Add platform dependencies to package.json:
{ "devDependencies": { "@service-runners/core": "*", "@service-runners/vite-runner": "*", "@service-runners/node-runner": "*" } } -
Update runners to import platform modules directly
-
Leverage platform error reporters and parsers
-
Use platform configuration patterns
Current vs Platform Architecture
Current (Custom Runners)
- Manual port allocation
- Basic process management
- Simple health checks
- Custom error handling
With Platform Integration
- Automatic port allocation via PortAllocator
- Robust ProcessManager with lifecycle hooks
- Advanced HealthMonitor with retry logic
- Structured ErrorReporter with framework-specific parsers
The platform integration provides production-ready service management following SOLID principles and established patterns.