Files
aitbc/scripts/wrappers/aitbc-agent-coordinator-wrapper.py
aitbc 96088f4501
Some checks failed
API Endpoint Tests / test-api-endpoints (push) Successful in 46s
CLI Tests / test-cli (push) Failing after 2s
Documentation Validation / validate-docs (push) Failing after 9s
Documentation Validation / validate-policies-strict (push) Failing after 12s
Package Tests / Python package - aitbc-agent-sdk (push) Successful in 24s
Package Tests / Python package - aitbc-core (push) Successful in 19s
Package Tests / Python package - aitbc-crypto (push) Successful in 10s
Package Tests / Python package - aitbc-sdk (push) Successful in 16s
Package Tests / JavaScript package - aitbc-sdk-js (push) Successful in 5s
Package Tests / JavaScript package - aitbc-token (push) Successful in 10s
Production Tests / Production Integration Tests (push) Successful in 17s
Python Tests / test-python (push) Successful in 8s
Security Scanning / security-scan (push) Successful in 46s
Multi-Node Blockchain Health Monitoring / health-check (push) Failing after 3s
Integration Tests / test-service-integration (push) Failing after 11m28s
docs-validation: expand curated markdown scope to include all documentation hubs
Add all documentation subdirectories to the curated markdown linting targets, replacing the previous exclusion-based approach with comprehensive coverage. Update validation to check for required README files across all hubs and verify priority documentation metadata markers. Implement lazy loading for optional dependencies (numpy, redis, bcrypt, jwt, websockets) in agent-coordinator and related modules to improve startup
2026-04-27 11:57:36 +02:00

40 lines
993 B
Python
Executable File

#!/usr/bin/env python3
"""
Wrapper script for aitbc-agent-coordinator service
Uses centralized aitbc utilities for path configuration
"""
import sys
import os
from pathlib import Path
# Add aitbc to path
sys.path.insert(0, str(Path("/opt/aitbc")))
from aitbc.constants import DATA_DIR, ENV_FILE, LOG_DIR, NODE_ENV_FILE, REPO_DIR
# Set up environment using aitbc constants
os.environ["AITBC_ENV_FILE"] = str(ENV_FILE)
os.environ["AITBC_NODE_ENV_FILE"] = str(NODE_ENV_FILE)
os.environ["PYTHONPATH"] = f"{REPO_DIR}:{REPO_DIR}/apps/agent-coordinator/src"
os.environ["DATA_DIR"] = str(DATA_DIR)
os.environ["LOG_DIR"] = str(LOG_DIR)
# Create required directories
from aitbc.paths import ensure_dir
ensure_dir(DATA_DIR / "agent-coordinator")
ensure_dir(LOG_DIR / "agent-coordinator")
# Execute the actual service
exec_cmd = [
"/opt/aitbc/venv/bin/python",
"-m",
"uvicorn",
"app.main:app",
"--host",
"0.0.0.0",
"--port",
"9001"
]
os.execvp(exec_cmd[0], exec_cmd)