Skip to content

Commit 223558e

Browse files
committed
Rename refua-studio integration to clawcures-ui
1 parent 1843fae commit 223558e

8 files changed

Lines changed: 68 additions & 61 deletions

File tree

GUIDEBOOK.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
This guidebook is for new users who want to deploy:
44

55
- the Refua agent (`ClawCures`)
6-
- Refua Studio (`refua-studio`)
6+
- ClawCures UI (`clawcures-ui`)
77

88
The fastest path is a single machine deployment, then moving to Kubernetes when needed.
99

@@ -13,7 +13,7 @@ The fastest path is a single machine deployment, then moving to Kubernetes when
1313
the campaign agent that plans and executes discovery workflows.
1414
- `refua-mcp`:
1515
the tool/runtime server used by the agent.
16-
- `refua-studio`:
16+
- `clawcures-ui`:
1717
the web control plane for operating campaigns and reviewing outputs.
1818

1919
## 2. Prerequisites
@@ -147,7 +147,7 @@ Then apply manifests with your standard Kubernetes workflow (`kubectl`, Argo CD,
147147
- `OPENCLAW_GATEWAY_TOKEN` missing:
148148
set token in `.env` or secret templates before running agent/studio.
149149
- `Address already in use`:
150-
change `REFUA_MCP_PORT` and/or `REFUA_STUDIO_PORT`.
150+
change `REFUA_MCP_PORT` and/or `CLAWCURES_UI_PORT`.
151151
- Import/runtime dependency errors:
152152
re-run `install-ecosystem.sh` or `refua-deploy install-ecosystem`.
153153
- Studio runs but tools unavailable:

README.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ It integrates with the Refua ecosystem packages:
1414
- `refua-notebook`
1515
- `refua-mcp`
1616
- `ClawCures`
17-
- `refua-studio`
17+
- `clawcures-ui`
1818
- `refua-deploy`
1919

20-
When these projects are present, `refua-deploy` auto-detects their versions and can install the full Refua ecosystem (including `refua-studio`).
20+
When these projects are present, `refua-deploy` auto-detects their versions and can install the full Refua ecosystem (including `clawcures-ui`).
2121

2222
## Guidebook
2323

@@ -297,9 +297,10 @@ Generated artifacts follow existing Refua runtime contracts:
297297
- `REFUA_MCP_ALLOWED_ORIGINS`
298298
- `REFUA_MCP_AUTH_TOKENS`
299299
- Studio auth env vars (single-machine `.env.template` + `run-studio.sh`):
300-
- `REFUA_STUDIO_AUTH_TOKENS`
301-
- `REFUA_STUDIO_OPERATOR_TOKENS`
302-
- `REFUA_STUDIO_ADMIN_TOKENS`
300+
- `CLAWCURES_UI_AUTH_TOKENS`
301+
- `CLAWCURES_UI_OPERATOR_TOKENS`
302+
- `CLAWCURES_UI_ADMIN_TOKENS`
303+
Legacy `REFUA_STUDIO_*` env vars are also accepted by generated scripts.
303304
- GPU runtime env vars:
304305
- `REFUA_GPU_MODE`
305306
- `REFUA_GPU_VENDOR`

src/refua_deploy/cli.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -582,9 +582,9 @@ def _single_machine_doctor_checks(output_dir: Path) -> list[dict[str, Any]]:
582582
)
583583

584584
for token_key in (
585-
"REFUA_STUDIO_AUTH_TOKENS",
586-
"REFUA_STUDIO_OPERATOR_TOKENS",
587-
"REFUA_STUDIO_ADMIN_TOKENS",
585+
"CLAWCURES_UI_AUTH_TOKENS",
586+
"CLAWCURES_UI_OPERATOR_TOKENS",
587+
"CLAWCURES_UI_ADMIN_TOKENS",
588588
"REFUA_MCP_AUTH_TOKENS",
589589
):
590590
checks.append(

src/refua_deploy/integration.py

Lines changed: 27 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,19 @@
99
from refua_deploy.models import DeploymentSpec
1010

1111
_DEFAULT_IMAGE_PREFIX = "ghcr.io/agentcures"
12-
_PROJECT_NAMES = (
13-
"refua",
14-
"refua-data",
15-
"refua-clinical",
16-
"refua-preclinical",
17-
"refua-regulatory",
18-
"refua-bench",
19-
"refua-wetlab",
20-
"refua-notebook",
21-
"refua-mcp",
22-
"ClawCures",
23-
"refua-studio",
24-
"refua-deploy",
12+
_PROJECT_CANDIDATES: tuple[tuple[str, tuple[str, ...]], ...] = (
13+
("refua", ("refua",)),
14+
("refua-data", ("refua-data",)),
15+
("refua-clinical", ("refua-clinical",)),
16+
("refua-preclinical", ("refua-preclinical",)),
17+
("refua-regulatory", ("refua-regulatory",)),
18+
("refua-bench", ("refua-bench",)),
19+
("refua-wetlab", ("refua-wetlab",)),
20+
("refua-notebook", ("refua-notebook",)),
21+
("refua-mcp", ("refua-mcp",)),
22+
("ClawCures", ("ClawCures",)),
23+
("clawcures-ui", ("clawcures-ui", "refua-studio")),
24+
("refua-deploy", ("refua-deploy",)),
2525
)
2626

2727

@@ -53,17 +53,19 @@ def discover_workspace(root: str | Path | None = None) -> WorkspaceIntegration:
5353

5454
for candidate in candidate_roots:
5555
projects: dict[str, ProjectReference] = {}
56-
for project_name in _PROJECT_NAMES:
57-
project_dir = candidate / project_name
58-
pyproject_path = project_dir / "pyproject.toml"
59-
if not pyproject_path.exists():
60-
continue
61-
version = _read_version(pyproject_path)
62-
projects[project_name] = ProjectReference(
63-
name=project_name,
64-
path=project_dir,
65-
version=version,
66-
)
56+
for canonical_name, candidate_names in _PROJECT_CANDIDATES:
57+
for project_name in candidate_names:
58+
project_dir = candidate / project_name
59+
pyproject_path = project_dir / "pyproject.toml"
60+
if not pyproject_path.exists():
61+
continue
62+
version = _read_version(pyproject_path)
63+
projects[canonical_name] = ProjectReference(
64+
name=canonical_name,
65+
path=project_dir,
66+
version=version,
67+
)
68+
break
6769

6870
if len(projects) > best_count:
6971
best_count = len(projects)
@@ -74,7 +76,7 @@ def discover_workspace(root: str | Path | None = None) -> WorkspaceIntegration:
7476

7577

7678
def ecosystem_packages() -> tuple[str, ...]:
77-
return _PROJECT_NAMES
79+
return tuple(canonical_name for canonical_name, _aliases in _PROJECT_CANDIDATES)
7880

7981

8082
def resolve_images(

src/refua_deploy/renderers.py

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -684,13 +684,13 @@ def _render_single_machine(
684684
f"REFUA_GPU_VENDOR={spec.gpu.vendor}",
685685
f"REFUA_GPU_COUNT={spec.gpu.count}",
686686
"",
687-
"REFUA_STUDIO_HOST=127.0.0.1",
688-
"REFUA_STUDIO_PORT=8787",
689-
"REFUA_STUDIO_DATA_DIR=.refua-studio",
690-
"REFUA_STUDIO_WORKSPACE_ROOT=.",
691-
"REFUA_STUDIO_AUTH_TOKENS=replace-me-viewer-token",
692-
"REFUA_STUDIO_OPERATOR_TOKENS=replace-me-operator-token",
693-
"REFUA_STUDIO_ADMIN_TOKENS=replace-me-admin-token",
687+
"CLAWCURES_UI_HOST=127.0.0.1",
688+
"CLAWCURES_UI_PORT=8787",
689+
"CLAWCURES_UI_DATA_DIR=.clawcures-ui",
690+
"CLAWCURES_UI_WORKSPACE_ROOT=.",
691+
"CLAWCURES_UI_AUTH_TOKENS=replace-me-viewer-token",
692+
"CLAWCURES_UI_OPERATOR_TOKENS=replace-me-operator-token",
693+
"CLAWCURES_UI_ADMIN_TOKENS=replace-me-admin-token",
694694
"",
695695
]
696696
)
@@ -764,13 +764,17 @@ def _render_single_machine(
764764
"",
765765
'PYTHON_BIN="${PYTHON_BIN:-$ROOT_DIR/.venv-refua/bin/python}"',
766766
'if [[ ! -x "$PYTHON_BIN" ]]; then PYTHON_BIN="python3"; fi',
767-
'STUDIO_HOST="${REFUA_STUDIO_HOST:-127.0.0.1}"',
768-
'STUDIO_PORT="${REFUA_STUDIO_PORT:-8787}"',
769-
'STUDIO_DATA_DIR="${REFUA_STUDIO_DATA_DIR:-$ROOT_DIR/.refua-studio}"',
770-
'STUDIO_WORKSPACE_ROOT="${REFUA_STUDIO_WORKSPACE_ROOT:-$ROOT_DIR}"',
771-
'STUDIO_AUTH_TOKENS="${REFUA_STUDIO_AUTH_TOKENS:-}"',
772-
'STUDIO_OPERATOR_TOKENS="${REFUA_STUDIO_OPERATOR_TOKENS:-}"',
773-
'STUDIO_ADMIN_TOKENS="${REFUA_STUDIO_ADMIN_TOKENS:-}"',
767+
'STUDIO_HOST="${CLAWCURES_UI_HOST:-${REFUA_STUDIO_HOST:-127.0.0.1}}"',
768+
'STUDIO_PORT="${CLAWCURES_UI_PORT:-${REFUA_STUDIO_PORT:-8787}}"',
769+
'DEFAULT_STUDIO_DATA_DIR="$ROOT_DIR/.clawcures-ui"',
770+
'if [[ -z "${CLAWCURES_UI_DATA_DIR:-}" && -z "${REFUA_STUDIO_DATA_DIR:-}" && ! -d "$DEFAULT_STUDIO_DATA_DIR" && -d "$ROOT_DIR/.refua-studio" ]]; then',
771+
' DEFAULT_STUDIO_DATA_DIR="$ROOT_DIR/.refua-studio"',
772+
"fi",
773+
'STUDIO_DATA_DIR="${CLAWCURES_UI_DATA_DIR:-${REFUA_STUDIO_DATA_DIR:-$DEFAULT_STUDIO_DATA_DIR}}"',
774+
'STUDIO_WORKSPACE_ROOT="${CLAWCURES_UI_WORKSPACE_ROOT:-${REFUA_STUDIO_WORKSPACE_ROOT:-$ROOT_DIR}}"',
775+
'STUDIO_AUTH_TOKENS="${CLAWCURES_UI_AUTH_TOKENS:-${REFUA_STUDIO_AUTH_TOKENS:-}}"',
776+
'STUDIO_OPERATOR_TOKENS="${CLAWCURES_UI_OPERATOR_TOKENS:-${REFUA_STUDIO_OPERATOR_TOKENS:-}}"',
777+
'STUDIO_ADMIN_TOKENS="${CLAWCURES_UI_ADMIN_TOKENS:-${REFUA_STUDIO_ADMIN_TOKENS:-}}"',
774778
"",
775779
"STUDIO_ARGS=(",
776780
' --host "$STUDIO_HOST"',
@@ -806,7 +810,7 @@ def _render_single_machine(
806810
" done",
807811
"fi",
808812
"",
809-
'"$PYTHON_BIN" -m refua_studio "${STUDIO_ARGS[@]}"',
813+
'"$PYTHON_BIN" -m clawcures_ui "${STUDIO_ARGS[@]}"',
810814
]
811815
_write_script(studio_path, studio_lines)
812816

tests/test_cli.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ def test_cli_install_ecosystem_dry_run(capsys: CaptureFixture[str]) -> None:
8787

8888
assert install_rc == 0
8989
rendered = capsys.readouterr().out
90-
assert "pip install refua-studio" in rendered
90+
assert "pip install clawcures-ui" in rendered
9191

9292

9393
def test_cli_install_ecosystem_executes_expected_package_order(
@@ -307,7 +307,7 @@ def test_cli_doctor_single_machine_checks_auth_placeholders(
307307
assert doctor_rc == 0
308308
payload = json.loads(capsys.readouterr().out)
309309
checks = {item["name"]: item for item in payload["checks"]}
310-
assert checks["single_machine_env_has_refua_studio_auth_tokens"]["ok"] is True
311-
assert checks["single_machine_env_has_refua_studio_operator_tokens"]["ok"] is True
312-
assert checks["single_machine_env_has_refua_studio_admin_tokens"]["ok"] is True
310+
assert checks["single_machine_env_has_clawcures_ui_auth_tokens"]["ok"] is True
311+
assert checks["single_machine_env_has_clawcures_ui_operator_tokens"]["ok"] is True
312+
assert checks["single_machine_env_has_clawcures_ui_admin_tokens"]["ok"] is True
313313
assert checks["run_studio_supports_auth_tokens"]["ok"] is True

tests/test_integration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def test_discover_workspace_includes_extended_refua_projects(tmp_path: Path) ->
5656
"refua-preclinical",
5757
"refua-data",
5858
"refua-regulatory",
59-
"refua-studio",
59+
"clawcures-ui",
6060
)
6161
for name in project_names:
6262
project_dir = workspace_root / name

tests/test_renderers.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ def test_render_single_machine_bundle(tmp_path: Path) -> None:
255255

256256
install_text = install_script.read_text(encoding="utf-8")
257257
assert "pip install --upgrade" in install_text
258-
assert "refua-studio" in install_text
258+
assert "clawcures-ui" in install_text
259259

260260
campaign_text = campaign_script.read_text(encoding="utf-8")
261261
assert "refua_campaign.cli run-autonomous" in campaign_text
@@ -267,15 +267,15 @@ def test_render_single_machine_bundle(tmp_path: Path) -> None:
267267
assert "--admin-token" in studio_text
268268

269269
env_text = env_template.read_text(encoding="utf-8")
270-
assert "REFUA_STUDIO_PORT=8787" in env_text
270+
assert "CLAWCURES_UI_PORT=8787" in env_text
271271
assert "REFUA_CAMPAIGN_OBJECTIVE=" in env_text
272272
assert (
273273
"REFUA_MCP_ALLOWED_HOSTS=127.0.0.1,127.0.0.1:9010,localhost,localhost:9010"
274274
in env_text
275275
)
276-
assert "REFUA_STUDIO_AUTH_TOKENS=" in env_text
277-
assert "REFUA_STUDIO_OPERATOR_TOKENS=" in env_text
278-
assert "REFUA_STUDIO_ADMIN_TOKENS=" in env_text
276+
assert "CLAWCURES_UI_AUTH_TOKENS=" in env_text
277+
assert "CLAWCURES_UI_OPERATOR_TOKENS=" in env_text
278+
assert "CLAWCURES_UI_ADMIN_TOKENS=" in env_text
279279

280280

281281
def test_render_gpu_required_for_kubernetes_and_compose(tmp_path: Path) -> None:

0 commit comments

Comments
 (0)