Add bridge API server (GET /session-id, POST /send) on port 8082

This commit is contained in:
Lucy
2026-05-16 12:14:25 +02:00
parent 751584c99d
commit 52b1b59264
4 changed files with 126 additions and 1 deletions

View File

@@ -20,6 +20,7 @@ import sys
from config import Config
from bridge import Bridge
from api_server import start_api_server
def setup_logging(debug: bool = False) -> None:
@@ -61,6 +62,9 @@ def main() -> None:
# Create and run the bridge
bridge = Bridge(config)
# Start the API server (daemon thread, non-blocking)
start_api_server(bridge, config.bridge.api_host, config.bridge.api_port)
# Verify agent API is reachable
if bridge.agent._request("GET", "/api/sessions") is not None:
log.info("Agent API is reachable")