Skip to content

Dodaios is an open-source agent OS for your desktop: it runs your coding agents, browser and apps by voice or chat, on your own machine. Formerly Personal Jarvis.

fix(cli): add config confirm/reject commands and update computer-use 503 hint (#872) (#1030)

ANO345755609db12fae
diff --git a/docs/dodaios-cli-reference.md b/docs/dodaios-cli-reference.md
index a3645f175b..0d92b29261 100644
--- a/docs/dodaios-cli-reference.md
+++ b/docs/dodaios-cli-reference.md
@@ -62,10 +62,12 @@ _Generated from the curated command tree by `scripts/ci/gen_cli_reference.py`
## config
+- `dodaios config confirm <pending_id> --yes --dry-run` — Confirm and apply a pending ASK-tier config mutation (destructive: --yes).
- `dodaios config get <path>` — Get a config value by dotted path (control-key gated).
- `dodaios config language get` — Show the current reply language + the available options.
- `dodaios config language set <lang> --persist --yes --dry-run` — Set the reply language (hot-reloads, no restart).
- `dodaios config list` — List the mutable-settings allowlist (path, risk tier, restart needed).
+- `dodaios config reject <pending_id> --yes --dry-run` — Reject and discard a pending ASK-tier config mutation.
- `dodaios config set <path> <value> --reason --yes --dry-run` — Set a mutable config value via the atomic write pipeline (destructive: --yes).
## contacts
diff --git a/dodaios/cli_ctl/command_index.py b/dodaios/cli_ctl/command_index.py
index 4d8eb6336f..4028f1322e 100644
--- a/dodaios/cli_ctl/command_index.py
+++ b/dodaios/cli_ctl/command_index.py
@@ -53,7 +53,15 @@ COMMAND_INDEX: dict[str, tuple[str, ...]] = {
"test <provider>",
"deep-model",
),
- "config": ("get <key>", "list", "set <key> <value>", "language get", "language set <de|en|es>"),
+ "config": (
+ "get <key>",
+ "list",
+ "set <key> <value>",
+ "confirm <id> --yes",
+ "reject <id>",
+ "language get",
+ "language set <de|en|es>",
+ ),
"wiki": (
'recall "<query>"',
"page <path>",
@@ -135,16 +143,16 @@ COMMAND_INDEX: dict[str, tuple[str, ...]] = {
"assistant health",
"assistant session",
"roles list",
- "roles set <chat|tools_screen|deep|embedding> <model>",
+ "roles set <role> <model>",
"models list",
"models show <model>",
"models unload <model> --yes",
- "models delete <model> [--reassign <model>] --yes",
+ "models delete <model> --yes",
"options get <model>",
"options set <model> <key=value ...>",
"options clear <model>",
"options suggest <model>",
- 'catalog search "<query>" [--capability --sort]',
+ 'catalog search "<query>"',
"catalog tags <model>",
"catalog recommended",
'hf search "<query>"',
diff --git a/dodaios/cli_ctl/commands/config.py b/dodaios/cli_ctl/commands/config.py
index db4c7e15af..168d6e30b7 100644
--- a/dodaios/cli_ctl/commands/config.py
+++ b/dodaios/cli_ctl/commands/config.py
@@ -62,6 +62,34 @@ def set_value(
)
+def confirm(
+ pending_id: str = typer.Argument(..., help="Pending mutation id from `config set`."),
+ yes: bool = options.yes_opt(),
+ dry_run: bool = options.dry_opt(),
+) -> None:
+ """Confirm and apply a pending ASK-tier config mutation (destructive: --yes)."""
+ invoke.run(
+ "POST", "/api/control/config/confirm",
+ body={"pending_id": pending_id},
+ assume_yes=yes, dry_run=dry_run, dangerous=True,
+ )
+
+
+def reject(
+ pending_id: str = typer.Argument(..., help="Pending mutation id from `config set`."),
+ yes: bool = options.yes_opt(),
+ dry_run: bool = options.dry_opt(),
+) -> None:
+ """Reject and discard a pending ASK-tier config mutation."""
+ invoke.run(
+ "POST", "/api/control/config/reject",
+ body={"pending_id": pending_id},
+ assume_yes=yes, dry_run=dry_run, dangerous=False,
+ )
+
+
@language_app.command("get")
def language_get() -> None:
"""Show the current reply language + the available options."""
diff --git a/dodaios/ui/web/computer_use_routes.py b/dodaios/ui/web/computer_use_routes.py
index a2cc69893c..10fcd2a1bc 100644
--- a/dodaios/ui/web/computer_use_routes.py
+++ b/dodaios/ui/web/computer_use_routes.py
@@ -67,9 +67,11 @@ def _require_cu_wired() -> None:
status_code=503,
detail=(
"computer-use is not active on this machine: "
- "[computer_use].enabled is false (the shipped default) or no "
- "vision engine could be built. Enable it with "
- f"`{CLI_COMMAND_NAME} config set computer_use.enabled true` and restart."
+ "no vision engine could be built (check `[brain.router.vision].enabled` "
+ "and vision provider credentials) or `[computer_use].enabled` was set "
+ "to false (it defaults to true). If disabled, enable it with "
+ f"`{CLI_COMMAND_NAME} config set computer_use.enabled true --yes` "
+ f"(then `{CLI_COMMAND_NAME} config confirm <pending_id> --yes`) and restart."
),
)
diff --git a/tests/unit/cli_ctl/test_commands_config.py b/tests/unit/cli_ctl/test_commands_config.py
index e8e74672df..606e3d74cc 100644
--- a/tests/unit/cli_ctl/test_commands_config.py
+++ b/tests/unit/cli_ctl/test_commands_config.py
@@ -60,3 +60,27 @@ def test_language_set(capture_api):
call = capture_api["calls"][-1]
assert call["method"] == "PUT" and call["path"] == "/api/settings/reply-language"
assert call["body"] == {"language": "es", "persist": True}
+
+
+def test_confirm_requires_yes(capture_api):
+ res = runner.invoke(app, ["config", "confirm", "00000000-0000-0000-0000-000000000001"])
+ assert res.exit_code == 1
+ assert capture_api["calls"] == []
+
+
+def test_confirm_with_yes_posts_pending_id(capture_api):
+ pid = "00000000-0000-0000-0000-000000000001"
+ res = runner.invoke(app, ["config", "confirm", pid, "--yes"])
+ assert res.exit_code == 0
+ call = capture_api["calls"][-1]
+ assert call["method"] == "POST" and call["path"] == "/api/control/config/confirm"
+ assert call["body"] == {"pending_id": pid}
+
+
+def test_reject_posts_pending_id(capture_api):
+ pid = "00000000-0000-0000-0000-000000000002"
+ res = runner.invoke(app, ["config", "reject", pid])
+ assert res.exit_code == 0
+ call = capture_api["calls"][-1]
+ assert call["method"] == "POST" and call["path"] == "/api/control/config/reject"
+ assert call["body"] == {"pending_id": pid}
diff --git a/tests/unit/ui/web/test_computer_use_routes.py b/tests/unit/ui/web/test_computer_use_routes.py
index d8ed3b8e8f..da47fdd9da 100644
--- a/tests/unit/ui/web/test_computer_use_routes.py
+++ b/tests/unit/ui/web/test_computer_use_routes.py
@@ -60,7 +60,10 @@ def test_start_refuses_honestly_when_cu_is_not_wired(app: FastAPI) -> None:
with TestClient(app) as client:
r = client.post("/api/computer-use/goals", json={"goal": "open the browser"})
assert r.status_code == 503
- assert "computer_use.enabled" in r.json()["detail"]
+ detail = r.json()["detail"]
+ assert "computer_use.enabled" in detail
+ assert "[brain.router.vision].enabled" in detail
+ assert "config confirm" in detail
def test_start_returns_a_pollable_mission_id(app: FastAPI, wired: list) -> None: