# Todo 15 Static Package Data Plan **Status:** done ## Goal Include the static debug UI assets in installed package builds. ## Why The FastAPI app serves `index.html`, `app.js`, and `styles.css` from `agent_lab.presentation.static`. Local source runs work because those files are present in the checkout. A built wheel needs explicit setuptools package-data configuration so installed console usage can still serve the UI. ## Scope This todo covers: - Add package-data configuration for static HTML, JS, and CSS files. - Add a focused test that prevents removing this packaging rule. - Build the package and inspect the wheel contents. This todo does not cover: - Changing runtime static path lookup. - Adding new frontend assets. - Production server entrypoint behavior. ## Files - Modify: `pyproject.toml` - Add/modify: `tests/test_packaging.py` - Modify: `docs/plans/todos.md` - Modify: this plan ## Steps 1. Add a failing test that reads `pyproject.toml` and asserts `agent_lab.presentation` includes `static/*.html`, `static/*.js`, and `static/*.css` package data. 2. Add `[tool.setuptools.package-data]` to `pyproject.toml`. 3. Run: ```bash uv run pytest tests/test_packaging.py uv run pytest ``` 4. Build and inspect package contents: ```bash uv build unzip -l dist/agent_lab-0.1.0-py3-none-any.whl | rg "agent_lab/presentation/static/(index.html|app.js|styles.css)" ``` 5. Update this plan and `docs/plans/todos.md`, then commit. ## Verification Result: - Red run passed as expected: `tests/test_packaging.py` failed because `tool.setuptools.package-data` was missing. - `uv run pytest tests/test_packaging.py` passed. - `uv run pytest` passed: 35 tests, 1 existing Starlette deprecation warning. - `uv build` passed after rerunning with permission to access the user uv cache. - `unzip -l dist/agent_lab-0.1.0-py3-none-any.whl | rg "agent_lab/presentation/static/(index.html|app.js|styles.css)"` found all three static UI assets. ## Evaluation - `pyproject.toml` now declares package data for static HTML, JS, and CSS. - The built wheel contains `agent_lab/presentation/static/index.html`, `app.js`, and `styles.css`.