Skip to content

Commit 8cfd1ca

Browse files
committed
Rename refua-studio package to clawcures-ui
1 parent 542941e commit 8cfd1ca

37 files changed

Lines changed: 7507 additions & 7389 deletions

Containerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@ USER studio
1919

2020
EXPOSE 8787
2121

22-
CMD ["refua-studio", "--host", "0.0.0.0", "--port", "8787", "--data-dir", "/data", "--workspace-root", "/workspace"]
22+
CMD ["clawcures-ui", "--host", "0.0.0.0", "--port", "8787", "--data-dir", "/data", "--workspace-root", "/workspace"]

README.md

Lines changed: 27 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# refua-studio
1+
# clawcures-ui
22

3-
`refua-studio` is the Refua web control plane for planning and running discovery campaigns.
3+
`clawcures-ui` is the ClawCures web control plane for planning and running discovery campaigns across the Refua workspace.
44

55
It provides:
66

@@ -31,51 +31,57 @@ This project is designed to reuse existing workspace components:
3131
## Install
3232

3333
```bash
34-
cd path/to/refua-studio
34+
cd path/to/clawcures-ui
3535
pip install -e .
3636
```
3737

3838
## Run
3939

4040
```bash
41-
refua-studio --host 127.0.0.1 --port 8787 --open-browser
41+
clawcures-ui --host 127.0.0.1 --port 8787 --open-browser
4242
```
4343

4444
Or from source without install:
4545

4646
```bash
47-
cd path/to/refua-studio
48-
PYTHONPATH=src python -m refua_studio --host 127.0.0.1 --port 8787
47+
cd path/to/clawcures-ui
48+
PYTHONPATH=src python -m clawcures_ui --host 127.0.0.1 --port 8787
4949
```
5050

51+
Legacy compatibility is still shipped for existing automation:
52+
53+
- `refua-studio` remains as a console-script alias
54+
- `python -m refua_studio` still works
55+
- legacy `REFUA_STUDIO_*` auth token env vars are still accepted
56+
5157
## Podman
5258

5359
Build image:
5460

5561
```bash
56-
cd path/to/refua-studio
57-
podman build -t refua-studio:local -f Containerfile .
62+
cd path/to/clawcures-ui
63+
podman build -t clawcures-ui:local -f Containerfile .
5864
```
5965

6066
Run container:
6167

6268
```bash
6369
podman run --rm -p 8787:8787 \
6470
-e REFUA_CAMPAIGN_OPENCLAW_BASE_URL=http://host.containers.internal:18789 \
65-
-v "$(pwd)/.refua-studio-data:/data" \
71+
-v "$(pwd)/.clawcures-ui-data:/data" \
6672
-v "$(pwd)/..:/workspace:ro" \
67-
refua-studio:local
73+
clawcures-ui:local
6874
```
6975

7076
Notes:
7177

72-
- The container starts `refua-studio` on `0.0.0.0:8787`.
78+
- The container starts `clawcures-ui` on `0.0.0.0:8787`.
7379
- Mount the monorepo root at `/workspace` so Studio can integrate with `ClawCures`, `refua-mcp`, and other sibling projects.
74-
- Persistent job database lives in `.refua-studio-data/`.
80+
- Persistent job database lives in `.clawcures-ui-data/`.
7581

7682
## Podman Compose
7783

78-
From `refua-studio/`:
84+
From `clawcures-ui/`:
7985

8086
```bash
8187
podman compose -f docker-compose.yml up --build
@@ -96,7 +102,7 @@ CLI flags:
96102

97103
- `--host`
98104
- `--port`
99-
- `--data-dir` (default: `.refua-studio`)
105+
- `--data-dir` (default: `.clawcures-ui`, with fallback to `.refua-studio` when present)
100106
- `--workspace-root` (defaults to parent workspace)
101107
- `--max-workers` (background job concurrency)
102108

@@ -264,14 +270,14 @@ Each job records request payload, status transitions (`queued` -> `running` -> `
264270
## Tests
265271

266272
```bash
267-
cd path/to/refua-studio
273+
cd path/to/clawcures-ui
268274
python -m unittest discover -s tests -v
269275
```
270276

271277
Playwright E2E suite:
272278

273279
```bash
274-
cd path/to/refua-studio
280+
cd path/to/clawcures-ui
275281
npm install
276282
npx playwright install chromium
277283
npm run test:e2e
@@ -284,7 +290,7 @@ command center, planning/jobs, clinical operations, and wet-lab/regulatory flows
284290
## Build
285291

286292
```bash
287-
cd path/to/refua-studio
293+
cd path/to/clawcures-ui
288294
python -m build
289295
```
290296

@@ -293,10 +299,10 @@ Build artifacts are written to `dist/` (`.tar.gz` and `.whl`).
293299
## Project Layout
294300

295301
```text
296-
refua-studio/
302+
clawcures-ui/
297303
Containerfile
298304
docker-compose.yml
299-
src/refua_studio/
305+
src/clawcures_ui/
300306
app.py
301307
bridge.py
302308
cli.py
@@ -307,6 +313,8 @@ refua-studio/
307313
index.html
308314
app.js
309315
styles.css
316+
src/refua_studio/
317+
...
310318
tests/
311319
```
312320

docker-compose.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
services:
2-
refua-studio:
2+
clawcures-ui:
33
build:
44
context: .
55
dockerfile: Containerfile
6-
image: refua-studio:local
7-
container_name: refua-studio
6+
image: clawcures-ui:local
7+
container_name: clawcures-ui
88
restart: unless-stopped
99
init: true
1010
ports:
@@ -16,7 +16,7 @@ services:
1616
OPENCLAW_GATEWAY_TOKEN: ${OPENCLAW_GATEWAY_TOKEN:-}
1717
REFUA_CAMPAIGN_OPENCLAW_TOKEN: ${REFUA_CAMPAIGN_OPENCLAW_TOKEN:-}
1818
command:
19-
- refua-studio
19+
- clawcures-ui
2020
- --host
2121
- 0.0.0.0
2222
- --port
@@ -28,7 +28,7 @@ services:
2828
- --max-workers
2929
- "2"
3030
volumes:
31-
- ./.refua-studio-data:/data
31+
- ./.clawcures-ui-data:/data
3232
- ../:/workspace:ro
3333
healthcheck:
3434
test:

e2e/helpers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ from pathlib import Path
102102
import json
103103
import os
104104
105-
from refua_studio.storage import JobStore
105+
from clawcures_ui.storage import JobStore
106106
107107
store = JobStore(Path(os.environ["STUDIO_DATA_DIR"]) / "studio.db")
108108
job = store.create_job(

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
2-
"name": "refua-studio-e2e",
2+
"name": "clawcures-ui-e2e",
33
"private": true,
44
"version": "0.7.1",
5-
"description": "Playwright E2E test suite for refua-studio",
5+
"description": "Playwright E2E test suite for clawcures-ui",
66
"scripts": {
77
"test:e2e": "playwright test",
88
"test:e2e:headed": "playwright test --headed",

playwright.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export default defineConfig({
2020
video: "retain-on-failure",
2121
},
2222
webServer: {
23-
command: `rm -rf .playwright-data && PYTHONPATH=src ./.venv_release/bin/python -m refua_studio --host ${host} --port ${port} --data-dir .playwright-data --workspace-root .. --max-workers 2`,
23+
command: `rm -rf .playwright-data && PYTHONPATH=src ./.venv_release/bin/python -m clawcures_ui --host ${host} --port ${port} --data-dir .playwright-data --workspace-root .. --max-workers 2`,
2424
url: `${baseURL}/api/health`,
2525
reuseExistingServer: false,
2626
timeout: 120_000,

pyproject.toml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ requires = ["setuptools>=68", "wheel"]
33
build-backend = "setuptools.build_meta"
44

55
[project]
6-
name = "refua-studio"
7-
version = "0.7.1"
8-
description = "Web control plane for Refua campaign orchestration and scientific execution."
6+
name = "clawcures-ui"
7+
version = "0.8.0"
8+
description = "Web control plane for ClawCures campaign orchestration and scientific execution."
99
readme = "README.md"
1010
requires-python = ">=3.11,<3.15"
1111
license = "MIT"
@@ -43,23 +43,24 @@ dependencies = [
4343

4444
[project.urls]
4545
Homepage = "https://agentcures.com/"
46-
Repository = "https://github.com/agentcures/refua"
47-
Documentation = "https://github.com/agentcures/refua#readme"
48-
Issues = "https://github.com/agentcures/refua/issues"
46+
Repository = "https://github.com/agentcures/clawcures-ui"
47+
Documentation = "https://github.com/agentcures/clawcures-ui#readme"
48+
Issues = "https://github.com/agentcures/clawcures-ui/issues"
4949

5050
[project.optional-dependencies]
5151
dev = [
5252
"pre-commit>=4.5.1",
5353
]
5454

5555
[project.scripts]
56+
clawcures-ui = "clawcures_ui.cli:main"
5657
refua-studio = "refua_studio.cli:main"
5758

5859
[tool.setuptools.packages.find]
5960
where = ["src"]
6061

6162
[tool.setuptools.package-data]
62-
refua_studio = ["static/*"]
63+
clawcures_ui = ["static/*"]
6364

6465
[tool.setuptools.exclude-package-data]
6566
"*" = ["*.py[cod]", "__pycache__/*"]

src/clawcures_ui/__init__.py

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
"""ClawCures UI package."""
2+
3+
from importlib.metadata import version as _distribution_version
4+
from pathlib import Path
5+
import tomllib
6+
7+
__all__ = ["__version__"]
8+
9+
10+
def _read_version_from_pyproject() -> str | None:
11+
pyproject_path = Path(__file__).resolve().parents[2] / "pyproject.toml"
12+
if not pyproject_path.exists():
13+
return None
14+
15+
data = tomllib.loads(pyproject_path.read_text(encoding="utf-8"))
16+
project = data.get("project", {})
17+
version = project.get("version")
18+
if not version:
19+
return None
20+
return str(version)
21+
22+
23+
def _resolve_version() -> str:
24+
local_version = _read_version_from_pyproject()
25+
if local_version is not None:
26+
return local_version
27+
for distribution_name in ("clawcures-ui", "refua-studio"):
28+
try:
29+
return _distribution_version(distribution_name)
30+
except Exception: # noqa: BLE001
31+
continue
32+
raise RuntimeError("Unable to resolve package version for clawcures-ui")
33+
34+
35+
__version__ = _resolve_version()

src/clawcures_ui/__main__.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
from __future__ import annotations
2+
3+
from clawcures_ui.cli import main
4+
5+
if __name__ == "__main__":
6+
raise SystemExit(main())

0 commit comments

Comments
 (0)