mirror of
https://github.com/leonvanzyl/autocoder.git
synced 2026-03-17 02:43:09 +00:00
feat: expose read-only MCP tools to all agent types, fix settings base URL handling
Add feature_get_ready, feature_get_blocked, and feature_get_graph to CODING_AGENT_TOOLS, TESTING_AGENT_TOOLS, and INITIALIZER_AGENT_TOOLS. These read-only tools were available on the MCP server but blocked by the allowed_tools lists, causing "blocked/not allowed" errors when agents tried to query project state. Fix SettingsModal custom base URL input: - Remove fallback to current settings value when saving, so empty input is not silently replaced with the existing URL - Remove .trim() on the input value to prevent cursor jumping while typing - Fix "Change" button pre-fill using empty string instead of space Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
10
client.py
10
client.py
@@ -141,7 +141,6 @@ def get_extra_read_paths() -> list[Path]:
|
|||||||
# overhead and preventing agents from calling tools meant for other roles.
|
# overhead and preventing agents from calling tools meant for other roles.
|
||||||
#
|
#
|
||||||
# Tools intentionally omitted from ALL agent lists (UI/orchestrator only):
|
# Tools intentionally omitted from ALL agent lists (UI/orchestrator only):
|
||||||
# feature_get_ready, feature_get_blocked, feature_get_graph,
|
|
||||||
# feature_remove_dependency
|
# feature_remove_dependency
|
||||||
#
|
#
|
||||||
# The ghost tool "feature_release_testing" was removed entirely -- it was
|
# The ghost tool "feature_release_testing" was removed entirely -- it was
|
||||||
@@ -151,6 +150,9 @@ CODING_AGENT_TOOLS = [
|
|||||||
"mcp__features__feature_get_stats",
|
"mcp__features__feature_get_stats",
|
||||||
"mcp__features__feature_get_by_id",
|
"mcp__features__feature_get_by_id",
|
||||||
"mcp__features__feature_get_summary",
|
"mcp__features__feature_get_summary",
|
||||||
|
"mcp__features__feature_get_ready",
|
||||||
|
"mcp__features__feature_get_blocked",
|
||||||
|
"mcp__features__feature_get_graph",
|
||||||
"mcp__features__feature_claim_and_get",
|
"mcp__features__feature_claim_and_get",
|
||||||
"mcp__features__feature_mark_in_progress",
|
"mcp__features__feature_mark_in_progress",
|
||||||
"mcp__features__feature_mark_passing",
|
"mcp__features__feature_mark_passing",
|
||||||
@@ -163,12 +165,18 @@ TESTING_AGENT_TOOLS = [
|
|||||||
"mcp__features__feature_get_stats",
|
"mcp__features__feature_get_stats",
|
||||||
"mcp__features__feature_get_by_id",
|
"mcp__features__feature_get_by_id",
|
||||||
"mcp__features__feature_get_summary",
|
"mcp__features__feature_get_summary",
|
||||||
|
"mcp__features__feature_get_ready",
|
||||||
|
"mcp__features__feature_get_blocked",
|
||||||
|
"mcp__features__feature_get_graph",
|
||||||
"mcp__features__feature_mark_passing",
|
"mcp__features__feature_mark_passing",
|
||||||
"mcp__features__feature_mark_failing",
|
"mcp__features__feature_mark_failing",
|
||||||
]
|
]
|
||||||
|
|
||||||
INITIALIZER_AGENT_TOOLS = [
|
INITIALIZER_AGENT_TOOLS = [
|
||||||
"mcp__features__feature_get_stats",
|
"mcp__features__feature_get_stats",
|
||||||
|
"mcp__features__feature_get_ready",
|
||||||
|
"mcp__features__feature_get_blocked",
|
||||||
|
"mcp__features__feature_get_graph",
|
||||||
"mcp__features__feature_create_bulk",
|
"mcp__features__feature_create_bulk",
|
||||||
"mcp__features__feature_create",
|
"mcp__features__feature_create",
|
||||||
"mcp__features__feature_add_dependency",
|
"mcp__features__feature_add_dependency",
|
||||||
|
|||||||
@@ -83,9 +83,8 @@ export function SettingsModal({ isOpen, onClose }: SettingsModalProps) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const handleSaveCustomBaseUrl = () => {
|
const handleSaveCustomBaseUrl = () => {
|
||||||
const effectiveBaseUrl = customBaseUrlInput || settings?.api_base_url || ''
|
if (customBaseUrlInput.trim() && !updateSettings.isPending) {
|
||||||
if (effectiveBaseUrl.trim() && !updateSettings.isPending) {
|
updateSettings.mutate({ api_base_url: customBaseUrlInput.trim() })
|
||||||
updateSettings.mutate({ api_base_url: effectiveBaseUrl.trim() })
|
|
||||||
setCustomBaseUrlInput('')
|
setCustomBaseUrlInput('')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -299,7 +298,7 @@ export function SettingsModal({ isOpen, onClose }: SettingsModalProps) {
|
|||||||
variant="ghost"
|
variant="ghost"
|
||||||
size="sm"
|
size="sm"
|
||||||
className="h-auto py-0.5 px-2 text-xs shrink-0"
|
className="h-auto py-0.5 px-2 text-xs shrink-0"
|
||||||
onClick={() => setCustomBaseUrlInput(settings.api_base_url || ' ')}
|
onClick={() => setCustomBaseUrlInput(settings.api_base_url || '')}
|
||||||
>
|
>
|
||||||
Change
|
Change
|
||||||
</Button>
|
</Button>
|
||||||
@@ -309,7 +308,7 @@ export function SettingsModal({ isOpen, onClose }: SettingsModalProps) {
|
|||||||
<div className="flex gap-2">
|
<div className="flex gap-2">
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
value={customBaseUrlInput.trim()}
|
value={customBaseUrlInput}
|
||||||
onChange={(e) => setCustomBaseUrlInput(e.target.value)}
|
onChange={(e) => setCustomBaseUrlInput(e.target.value)}
|
||||||
placeholder={currentProvider === 'azure' ? 'https://your-resource.services.ai.azure.com/anthropic' : 'https://api.example.com/v1'}
|
placeholder={currentProvider === 'azure' ? 'https://your-resource.services.ai.azure.com/anthropic' : 'https://api.example.com/v1'}
|
||||||
className="flex-1 py-1.5 px-3 text-sm border rounded-md bg-background"
|
className="flex-1 py-1.5 px-3 text-sm border rounded-md bg-background"
|
||||||
|
|||||||
Reference in New Issue
Block a user