6ixPulse build missing
Run npm run build before starting the Gradio Server wrapper.
"""
return inject_runtime_config(index_path.read_text(encoding="utf-8"))
@app.get("/health")
async def health() -> dict[str, Any]:
return {
"ok": True,
"service": "6ixPulse Gradio Server",
"nodeBackendReady": backend_is_ready(),
}
@app.get("/api/agent/health")
async def agent_health() -> Response:
status, raw, content_type = request_node("GET", "/api/agent/health")
return Response(content=raw, status_code=status, media_type=content_type)
@app.get("/api/agent/search/health")
async def search_health() -> Response:
status, raw, content_type = request_node("GET", "/api/agent/search/health")
return Response(content=raw, status_code=status, media_type=content_type)
@app.post("/api/agent/run")
async def agent_run(request: Request) -> Response:
status, raw, content_type = request_node("POST", "/api/agent/run", await request.body())
return Response(content=raw, status_code=status, media_type=content_type)
@app.mcp.tool(name="run_agent")
@app.api(name="run_agent", concurrency_limit=2)
def run_agent(prompt: str) -> dict[str, Any]:
"""Run the 6ixPulse agentic housing research workflow for a renter prompt."""
return node_json("POST", "/api/agent/run", {"prompt": prompt})
if __name__ == "__main__":
start_node_backend()
app.launch(
server_name="0.0.0.0",
server_port=int(os.environ.get("PORT", "7860")),
show_error=True,
mcp_server=True,
)