fix(computer-tools): point permission-denied hints at the Capabilities tab by Soulter · Pull Request #10445 · AstrBotDevs/AstrBot · GitHub
Skip to content

fix(computer-tools): point permission-denied hints at the Capabilities tab - #10445

Merged
Soulter merged 1 commit into
masterfrom
codex/update-permission-error-entry
Oct 7, 2026
Merged

Soulter merged 1 commit into
masterfrom
codex/update-permission-error-entry

Conversation

@Soulter

@Soulter Soulter commented Oct 7, 2026 •

Copy link
Copy Markdown
Member

Summary

The Agent Computer Use settings moved in the WebUI from Config -> Normal Config -> AI -> Agent Computer Use to Config -> AI -> Capabilities -> Agent Computer Use. The permission-denied messages in astrbot/core/tools/computer_tools/util.py still referenced the old path, sending users to a navigation entry that no longer exists.

This PR updates the three affected messages so the remediation path matches the current WebUI navigation, consistent with the existing docs (docs/en/use/computer.md, docs/en/faq.md, docs/en/use/astrbot-agent-sandbox.md):

  • Local tools disabled for the role → ... -> Capabilities -> Agent Computer Use -> Local Permission Policies
  • Execution disabled by Local permission policy → ... -> Capabilities -> Agent Computer Use -> Local Permission Policies
  • Restricted execution unavailable (no OS sandbox) → ... -> Capabilities -> Agent Computer Use -> Computer Use Runtime

Test plan

  • ruff format / ruff check pass
  • Trigger a permission-denied response and confirm the hint text points to the Capabilities tab

Summary by Sourcery

Bug Fixes:

  • Update computer-tools permission-denied guidance to point users to the current WebUI Capabilities navigation for Agent Computer Use settings.

…s tab

The Agent Computer Use settings moved from 'Config -> Normal Config ->
AI -> Agent Computer Use' to 'Config -> AI -> Capabilities -> Agent
Computer Use'. Update the three permission-denied messages returned to
the model/user so the remediation path matches the current WebUI
navigation, consistent with the existing docs.

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've found 1 issue

Prompt for AI Agents
Please address the comments from this code review:

## Individual Comments

### Comment 1
<location path="astrbot/core/tools/computer_tools/util.py" line_range="197" />
<code_context>
             "Local permission policy for this user role. Enable Local computer "
             "access and `Execute code` "
-            "for this role in AstrBot WebUI -> Config -> Normal Config -> AI -> "
+            "for this role in AstrBot WebUI -> Config -> AI -> Capabilities -> "
             "Agent Computer Use -> Local Permission Policies."
         )
</code_context>
<issue_to_address>
**Permission tests fail**

When the permission test suite runs, `check_local_execution_permission` returns the updated Capabilities path, but `test_local_permission_policy_denies_disabled_execution` still asserts that the error contains `WebUI -> Config -> Normal Config`, so pytest fails.

Update the test assertion to expect the Capabilities path.
</issue_to_address>

Sourcery assessment

Approval pending. 1 finding to address first.

Blocking findings: astrbot/core/tools/computer_tools/util.py:197


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 Critical · Permission tests fail

When the permission test suite runs, check_local_execution_permission returns the updated Capabilities path, but test_local_permission_policy_denies_disabled_execution still asserts that the error contains WebUI -> Config -> Normal Config, so pytest fails.

Update the test assertion to expect the Capabilities path.

Prompt for AI agents
In `astrbot/core/tools/computer_tools/util.py` at line 197:

**Permission tests fail**

When the permission test suite runs, `check_local_execution_permission` returns the updated Capabilities path, but `test_local_permission_policy_denies_disabled_execution` still asserts that the error contains `WebUI -> Config -> Normal Config`, so pytest fails.

Update the test assertion to expect the Capabilities path.

@Soulter
Soulter merged commit eef9712 into master Oct 7, 2026
20 of 24 checks passed
@Soulter
Soulter deleted the codex/update-permission-error-entry branch October 7, 2026 16:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant