Something went wrong. Try again.
Where attention appears to go across agent threads: collector, web explorer, and native iOS client
Something went wrong. Try again.
123456789101112131415161718192021from pathlib import Pathimport sysimport osfrom dotenv import load_dotenv
root = Path(__file__).resolve().parents[1]sys.path.insert(0, str(root))config = Path.home() / '.config/agents-mcp/server.env'if not config.exists(): raise SystemExit('Missing agents MCP configuration; refusing to start HTTP without authentication')load_dotenv(config, override=True)os.environ['SESSIONS_PUBLIC_SNAPSHOT'] = '1'from mcp_server import build_serverfrom http_boundary import HTTPBoundaryfrom starlette.middleware import Middleware
server = build_server()if server.auth is None: raise SystemExit('Missing authentication; refusing to start HTTP')server.run(transport='http', host='127.0.0.1', port=int(os.getenv('SESSIONS_PORT', '8766')), middleware=[Middleware(HTTPBoundary, base=os.environ['SESSIONS_MCP_BASE_URL'])], stateless_http=True, json_response=True, uvicorn_config={'access_log': False, 'limit_concurrency': 16, 'timeout_keep_alive': 5})