awslabs / awslabs/cli-agent-orchestrator

[Bug] Web UI assets not included in PyPI package, GET / returns 404

Open
#610 2 comments 0 reactions 1 assignee Claimed by @anilkmr-a2z View on GitHub
Dominant language
Python
Stars
1.3k
Forks
267
Avg merge
1d 23h
Merged PRs (30d)
70

Description

## Summary

Installing `cli-agent-orchestrator` from PyPI (tested v2.4.1 via `uv tool install`) and running `cao-server` results in `GET /` returning 404. The Web UI dashboard is inaccessible.

## Root Cause

The `web_ui/` directory (built output of `web/`) is not included in the published PyPI package. The server only mounts static files when `web_ui/index.html` exists:

```python
# api/main.py
WEB_DIST = Path(str(_pkg_files("cli_agent_orchestrator") / "web_ui"))
if (WEB_DIST / "index.html").exists():
app.mount("/", StaticFiles(directory=str(WEB_DIST), html=True), name="web")
```

Since the directory is absent, the mount is silently skipped.

## Steps to Reproduce

1. `uv tool install cli-agent-orchestrator` (or `pip install cli-agent-orchestrator`)
2. `cao-server`
3. Open http://127.0.0.1:9889/ in a browser

**Expected:** Web dashboard loads
**Actual:** 404 Not Found

## Environment

- cli-agent-orchestrator 2.4.1
- macOS
- Installed via `uv tool install`

## Workaround

Clone the repo, build the web UI, and copy it into the installed package:

```bash
git clone --depth 1 https://github.com/awslabs/cli-agent-orchestrator.git /tmp/cao-source
cd /tmp/cao-source/web && npm install && npm run build
cp -r /tmp/cao-source/src/cli_agent_orchestrator/web_ui \
"$(python3 -c "import cli_agent_orchestrator, pathlib; print(pathlib.Path(cli_agent_orchestrator.__file__).parent)")/web_ui"
rm -rf /tmp/cao-source
```

Then restart `cao-server`.

## Suggested Fix

Include the pre-built `web_ui/` assets in the package distribution (e.g., add to `package-data` in `pyproject.toml`, or run the web build in CI before publishing to PyPI).

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.