2026-01-18 17:10:38 -08:00
|
|
|
#!/usr/bin/env python3
|
|
|
|
|
"""
|
|
|
|
|
@model-boss Workspace Script Runner
|
|
|
|
|
|
|
|
|
|
Unified command runner for the @model-boss workspace.
|
|
|
|
|
|
|
|
|
|
Usage:
|
2026-03-06 02:13:58 -08:00
|
|
|
./run install # Install all dependencies
|
2026-01-18 17:10:38 -08:00
|
|
|
./run dev <service> # Start development server
|
|
|
|
|
./run prod <service> # Start production server
|
|
|
|
|
./run --help # Show all available commands
|
|
|
|
|
./run <command> --help # Show command-specific help
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
import sys
|
|
|
|
|
from pathlib import Path
|
|
|
|
|
|
2026-03-06 02:13:58 -08:00
|
|
|
from lilith_workspace_runner import ScriptRunner, WorkspaceConfig
|
|
|
|
|
from lilith_workspace_runner.commands import (
|
|
|
|
|
create_dev_command,
|
|
|
|
|
create_install_command,
|
|
|
|
|
create_prod_command,
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
config = WorkspaceConfig(
|
|
|
|
|
name="@model-boss",
|
|
|
|
|
typescript_packages=[
|
|
|
|
|
"packages/core-ts",
|
|
|
|
|
"services/coordinator/types",
|
|
|
|
|
"services/coordinator/client",
|
|
|
|
|
"frontend",
|
|
|
|
|
],
|
|
|
|
|
python_packages=[
|
|
|
|
|
"packages/core-py",
|
|
|
|
|
"packages/loaders-py",
|
|
|
|
|
"services/coordinator/service",
|
|
|
|
|
"services/llama-http/service",
|
|
|
|
|
],
|
|
|
|
|
service_ports_file="ports.yaml",
|
|
|
|
|
service_ports_section="model-boss",
|
|
|
|
|
service_dirs={
|
|
|
|
|
"coordinator": "services/coordinator/service",
|
|
|
|
|
"llama-http": "services/llama-http/service",
|
|
|
|
|
},
|
|
|
|
|
service_apps={
|
|
|
|
|
"coordinator": "model_boss_coordinator:create_app",
|
|
|
|
|
"llama-http": "llama_http:create_app",
|
|
|
|
|
},
|
|
|
|
|
service_modules={
|
|
|
|
|
"coordinator": "model_boss_coordinator",
|
|
|
|
|
"llama-http": "llama_http",
|
|
|
|
|
},
|
|
|
|
|
service_env={
|
|
|
|
|
"coordinator": {"MODEL_BOSS_PORT": "{port}"},
|
|
|
|
|
"llama-http": {"LLAMA_HTTP_PORT": "{port}"},
|
|
|
|
|
},
|
|
|
|
|
)
|
2026-01-18 17:10:38 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
def main():
|
|
|
|
|
"""Main entry point."""
|
|
|
|
|
script_path = Path(__file__).resolve()
|
2026-03-06 02:13:58 -08:00
|
|
|
workspace_root = script_path.parent.parent.parent
|
2026-01-18 17:10:38 -08:00
|
|
|
|
2026-03-06 02:13:58 -08:00
|
|
|
runner = ScriptRunner(workspace_root, config.name)
|
2026-01-18 17:10:38 -08:00
|
|
|
|
2026-03-06 02:13:58 -08:00
|
|
|
for register in [
|
|
|
|
|
create_install_command(config),
|
|
|
|
|
create_dev_command(config),
|
|
|
|
|
create_prod_command(config),
|
|
|
|
|
]:
|
|
|
|
|
register(runner)
|
2026-01-18 17:10:38 -08:00
|
|
|
|
|
|
|
|
sys.exit(runner.run())
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|
|
|
|
|
main()
|