Conversation
Add a complete agent-native CLI for AdGuardHome DNS server management. This is the first REST API-based service harness in CLI-Anything, expanding coverage beyond desktop applications to network infrastructure. New category: Network & Infrastructure Modules: blocking, clients, dhcp, filtering, log, project, rewrite, server, session, stats (10 core modules + CLI + REPL skin + backend) Tests: 36 tests (unit + e2e) covering all core modules Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8af9cfba7d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if enabled is not None: | ||
| output(log_core.set_log_config(client, enabled=enabled, | ||
| interval=interval or 90), ctx.obj["as_json"]) | ||
| else: | ||
| output(log_core.get_log_config(client), ctx.obj["as_json"]) |
There was a problem hiding this comment.
Honor --interval when configuring query log
log config --interval <days> never updates AdGuardHome because the handler only calls set_log_config when --enabled/--disabled is present, and otherwise falls back to get_log_config. This makes the advertised --interval option ineffective unless users also toggle enabled state, so interval-only updates silently do nothing.
Useful? React with 👍 / 👎.
|
|
||
|
|
||
| def set_enabled(client: AdGuardHomeClient, enabled: bool) -> dict: | ||
| return client.post("/filtering/config", {"enabled": enabled, "interval": 24}) |
There was a problem hiding this comment.
Preserve filter refresh interval on toggle
filter toggle on|off is documented as a global enable/disable switch, but set_enabled always posts {"interval": 24} alongside the enabled flag. This means every toggle overwrites the server's existing filter refresh cadence to 24 hours, causing unintended configuration drift for instances using a custom interval.
Useful? React with 👍 / 👎.
|
Thanks for the clean PR. Two functional issues remain:
Please fix these and we can merge. |
Summary
Test plan
pip install -e adguardhome/agent-harnessinstalls without errorspython -m cli_anything.adguardhome --helpshows all commandspytest adguardhome/agent-harness/cli_anything/adguardhome/tests/test_core.pypytest adguardhome/agent-harness/cli_anything/adguardhome/tests/test_full_e2e.py🤖 Generated with Claude Code