Skip to content

armgit / avibe

Public Imported from GitHub
0

Make your computer a home for your AI partner. Avibe is the local-first Agent OS: Vibey, its built-in AI partner, works out of the box, and Claude Code, Codex & OpenCode run unchanged beside it — reach them from your browser, phone, or any chat app.

fix(e2e): support lan host for three-end ui

cyhhaofadc0c1af9bf
diff --git a/.env.three-regression.example b/.env.three-regression.example
index 71589fd10..57c794a8a 100644
--- a/.env.three-regression.example
+++ b/.env.three-regression.example
@@ -37,6 +37,7 @@ THREE_REGRESSION_OPENCODE_ANTHROPIC_API_KEY=
# -----------------------------------------------------------------------------
# Shared regression defaults
# -----------------------------------------------------------------------------
+THREE_REGRESSION_UI_HOST=127.0.0.1
THREE_REGRESSION_DEFAULT_CWD=/data/vibe_remote/workdir
THREE_REGRESSION_LOG_LEVEL=INFO
THREE_REGRESSION_LANGUAGE=en
diff --git a/docs/three-end-regression/README.md b/docs/three-end-regression/README.md
index 46396f3d5..78fd19c01 100644
--- a/docs/three-end-regression/README.md
+++ b/docs/three-end-regression/README.md
@@ -21,6 +21,7 @@ It complements the existing automated `E2E` flow instead of replacing it:
- shared LLM credentials: `ANTHROPIC_API_KEY`, `OPENAI_API_KEY`
- optional API base URLs: `ANTHROPIC_BASE_URL`, `OPENAI_BASE_URL`, `OPENAI_API_BASE`
+- optional UI host override: `THREE_REGRESSION_UI_HOST` (useful when exposing the three UIs on a LAN host)
- platform-specific bot credentials for Slack, Discord, and Feishu
- the target regression channel for each platform, if you want channel routing preseeded at startup
- the backend that each platform should pin to by default
@@ -69,6 +70,8 @@ Discord -> http://127.0.0.1:15132
Feishu -> http://127.0.0.1:15133
```
+If you set `THREE_REGRESSION_UI_HOST=192.168.2.3`, the printed URLs and generated UI config will use that host instead.
+
On first startup, or when you run with `--reset-config` / `--reset-all`, the runner seeds these files for every service:
- `config/config.json`
diff --git a/scripts/prepare_three_regression.py b/scripts/prepare_three_regression.py
index 8a06bb02b..26a1474ab 100755
--- a/scripts/prepare_three_regression.py
+++ b/scripts/prepare_three_regression.py
@@ -96,6 +96,10 @@ def _service_default_cwd(service_name: str) -> str:
return _env(f"{prefix}_DEFAULT_CWD", _env("THREE_REGRESSION_DEFAULT_CWD", "/data/vibe_remote/workdir"))
+def _ui_host() -> str:
+ return _env("THREE_REGRESSION_UI_HOST", "127.0.0.1")
+
+
def _base_slack_payload() -> dict:
return {
"bot_token": "",
@@ -176,7 +180,7 @@ def _build_config_payload(service_name: str) -> dict:
},
"gateway": None,
"ui": {
- "setup_host": "127.0.0.1",
+ "setup_host": _ui_host(),
"setup_port": 5123,
"open_browser": False,
},
diff --git a/scripts/run_three_regression.sh b/scripts/run_three_regression.sh
index 107e600d2..782bb77e3 100755
--- a/scripts/run_three_regression.sh
+++ b/scripts/run_three_regression.sh
@@ -113,6 +113,7 @@ print_summary() {
local slack_channel="${THREE_REGRESSION_SLACK_CHANNEL:-}"
local discord_channel="${THREE_REGRESSION_DISCORD_CHANNEL:-}"
local feishu_channel="${THREE_REGRESSION_FEISHU_CHAT_ID:-}"
+ local ui_host="${THREE_REGRESSION_UI_HOST:-127.0.0.1}"
if [ -z "$slack_channel" ]; then
slack_channel="(configure later in UI)"
@@ -126,9 +127,9 @@ print_summary() {
cat <<EOF
Three-end regression environment is ready:
-- Slack: http://127.0.0.1:${THREE_REGRESSION_SLACK_PORT:-15131} channel=${slack_channel} backend=${THREE_REGRESSION_SLACK_BACKEND}
-- Discord: http://127.0.0.1:${THREE_REGRESSION_DISCORD_PORT:-15132} channel=${discord_channel} backend=${THREE_REGRESSION_DISCORD_BACKEND}
-- Feishu: http://127.0.0.1:${THREE_REGRESSION_FEISHU_PORT:-15133} channel=${feishu_channel} backend=${THREE_REGRESSION_FEISHU_BACKEND}
+- Slack: http://${ui_host}:${THREE_REGRESSION_SLACK_PORT:-15131} channel=${slack_channel} backend=${THREE_REGRESSION_SLACK_BACKEND}
+- Discord: http://${ui_host}:${THREE_REGRESSION_DISCORD_PORT:-15132} channel=${discord_channel} backend=${THREE_REGRESSION_DISCORD_BACKEND}
+- Feishu: http://${ui_host}:${THREE_REGRESSION_FEISHU_PORT:-15133} channel=${feishu_channel} backend=${THREE_REGRESSION_FEISHU_BACKEND}
EOF
}
diff --git a/tests/test_prepare_three_regression.py b/tests/test_prepare_three_regression.py
index c35312116..be83bb86b 100644
--- a/tests/test_prepare_three_regression.py
+++ b/tests/test_prepare_three_regression.py
@@ -23,6 +23,7 @@ def _set_required_env(monkeypatch: pytest.MonkeyPatch) -> None:
"OPENAI_API_KEY": "sk-openai-test",
"OPENAI_BASE_URL": "https://openai.example",
"OPENAI_API_BASE": "https://openai.example/v1",
+ "THREE_REGRESSION_UI_HOST": "192.168.2.3",
"THREE_REGRESSION_DEFAULT_CWD": "/data/vibe_remote/workdir",
"THREE_REGRESSION_LOG_LEVEL": "DEBUG",
"THREE_REGRESSION_LANGUAGE": "en",
@@ -67,6 +68,7 @@ def test_prepare_generates_three_isolated_states(tmp_path: Path, monkeypatch: py
assert slack_config["platform"] == "slack"
assert slack_config["agents"]["default_backend"] == "opencode"
+ assert slack_config["ui"]["setup_host"] == "192.168.2.3"
assert discord_config["platform"] == "discord"
assert discord_config["agents"]["default_backend"] == "codex"
assert discord_config["discord"]["guild_allowlist"] == ["754776951587340359"]