#!/usr/bin/env -S v -n -w -gc none -cc tcc -d use_openssl -enable-globals run import incubaid.herolib.installers.horus.coordinator import incubaid.herolib.installers.horus.supervisor import incubaid.herolib.installers.horus.herorunner import incubaid.herolib.installers.horus.osirisrunner import incubaid.herolib.installers.horus.salrunner import time // Start All Horus Services // This script starts all Horus components in the correct order println('šŸš€ Starting All Horus Services') // Step 1: Start Coordinator println('\nā–¶ļø Step 1/5: Starting Coordinator...') mut coordinator_installer := coordinator.get(name: 'ayman', create: true)! coordinator_installer.start()! if coordinator_installer.running()! { println('āœ… Coordinator is running on HTTP:${coordinator_installer.http_port} WS:${coordinator_installer.ws_port}') } else { println('āŒ Coordinator failed to start') } // Step 2: Start Supervisor println('\nā–¶ļø Step 2/5: Starting Supervisor...') mut supervisor_inst := supervisor.get(create: true)! supervisor_inst.start()! if supervisor_inst.running()! { println('āœ… Supervisor is running on HTTP:${supervisor_inst.http_port} WS:${supervisor_inst.ws_port}') } else { println('āŒ Supervisor failed to start') } // Step 3: Start Hero Runner println('\nā–¶ļø Step 3/5: Starting Hero Runner...') mut hero_runner := herorunner.get(create: true)! hero_runner.start()! if hero_runner.running()! { println('āœ… Hero Runner is running') } else { println('āŒ Hero Runner failed to start') } // Step 4: Start Osiris Runner println('\nā–¶ļø Step 4/5: Starting Osiris Runner...') mut osiris_runner := osirisrunner.get(create: true)! osiris_runner.start()! if osiris_runner.running()! { println('āœ… Osiris Runner is running') } else { println('āŒ Osiris Runner failed to start') } // Step 5: Start SAL Runner println('\nā–¶ļø Step 5/5: Starting SAL Runner...') mut sal_runner := salrunner.get(create: true)! sal_runner.start()! if sal_runner.running()! { println('āœ… SAL Runner is running') } else { println('āŒ SAL Runner failed to start') } println('šŸŽ‰ All Horus services started!') println('\nšŸ“Š Service Status:') coordinator_status := if coordinator_installer.running()! { 'āœ… Running' } else { 'āŒ Stopped' } println(' • Coordinator: ${coordinator_status} (http://127.0.0.1:${coordinator_installer.http_port})') supervisor_status := if supervisor_inst.running()! { 'āœ… Running' } else { 'āŒ Stopped' } println(' • Supervisor: ${supervisor_status} (http://127.0.0.1:${supervisor_inst.http_port})') hero_runner_status := if hero_runner.running()! { 'āœ… Running' } else { 'āŒ Stopped' } println(' • Hero Runner: ${hero_runner_status}') osiris_runner_status := if osiris_runner.running()! { 'āœ… Running' } else { 'āŒ Stopped' } println(' • Osiris Runner: ${osiris_runner_status}') sal_runner_status := if sal_runner.running()! { 'āœ… Running' } else { 'āŒ Stopped' } println(' • SAL Runner: ${sal_runner_status}') println('\nšŸ’” Next Steps:') println(' To stop services, run: ./horus_stop_all.vsh') println(' To check status, run: ./horus_status.vsh')