Expose short copy/paste operator prompts on /prompts derived from canonical workflow files with workflow path and SHA-256 hash. Adds JSON export at /api/prompts, copy buttons, and tests. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
76 lines
2.4 KiB
Markdown
76 lines
2.4 KiB
Markdown
# Internal web UI — local development (#426)
|
|
|
|
Read-only MVP skeleton for the MCP Control Plane operator console. Gitea,
|
|
MCP capability gates, and `skills/llm-project-workflow/` remain the source of
|
|
truth; this UI only provides route stubs and layout.
|
|
|
|
## Prerequisites
|
|
|
|
- Python 3.11+ with project dependencies installed (`pip install -r requirements.txt`)
|
|
- No secrets in repo, config, or client bundle
|
|
|
|
## Start the server
|
|
|
|
From the repository root (or an issue worktree):
|
|
|
|
```bash
|
|
./scripts/run-webui
|
|
```
|
|
|
|
Or directly:
|
|
|
|
```bash
|
|
python3 -m webui
|
|
```
|
|
|
|
Optional environment variables:
|
|
|
|
| Variable | Default | Purpose |
|
|
|----------|---------|---------|
|
|
| `WEBUI_HOST` | `127.0.0.1` | Bind address (keep local for MVP) |
|
|
| `WEBUI_PORT` | `8765` | Listen port |
|
|
|
|
## Routes (MVP)
|
|
|
|
| Path | Description |
|
|
|------|-------------|
|
|
| `/` | Home / operator overview |
|
|
| `/health` | JSON liveness (`status`, `service`, `mode`, `timestamp`) |
|
|
| `/projects` | Project registry list (#427) |
|
|
| `/projects/{id}` | Project detail + onboarding checklist |
|
|
| `/api/projects` | JSON registry export |
|
|
| `/prompts` | Prompt library with per-prompt copy buttons (#428) |
|
|
| `/api/prompts` | JSON prompt export with workflow hashes |
|
|
| `/runtime` | Stub — MCP runtime health (#430) |
|
|
| `/audit` | Stub — report audit paste (#431) |
|
|
| `/worktrees` | Stub — hygiene dashboard (#432) |
|
|
| `/leases` | Stub — lease visibility (#433) |
|
|
|
|
All routes are GET-only. POST/PUT/PATCH/DELETE return `405` with
|
|
`read-only-mvp`.
|
|
|
|
## Project registry (#427)
|
|
|
|
Versioned registry file: `webui/data/projects.registry.json` (schema version `1`).
|
|
|
|
Override path with `WEBUI_PROJECT_REGISTRY` when operators keep a machine-local
|
|
copy outside git. The registry stores repo identity, remotes, profile names,
|
|
workflow/schema path references, and onboarding checklist steps — never tokens
|
|
or credentials.
|
|
|
|
Seed entry: **Gitea-Tools** on `https://gitea.prgs.cc` with `prgs-author`,
|
|
`prgs-reviewer`, and `prgs-reconciler` profiles.
|
|
|
|
## Prompt library (#428)
|
|
|
|
Prompts are generated at load time from canonical workflow files under
|
|
`skills/llm-project-workflow/workflows/`. SHA-256 hashes are computed from
|
|
`WEBUI_REPO_ROOT` (defaults to the repository root). Prompt bodies are short
|
|
copy/paste starters; canonical workflow files remain the only full policy
|
|
source.
|
|
|
|
## Tests
|
|
|
|
```bash
|
|
pytest tests/test_webui_skeleton.py tests/test_webui_project_registry.py tests/test_webui_prompt_library.py -q
|
|
``` |