Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/agent-tools/src/desktop/canonical-tool-policy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ const READ_ONLY_CANONICAL_BLOCKED_TOOL_NAMES = new Set([
'request_feature_enable',
]);

/** Computer-use tools share the desktop_* namespace across native and MCP paths. */
/** Computer-use tools share the computer_* namespace across native and MCP paths. */
export function isComputerUseRuntimeToolName(name: string): boolean {
return name.startsWith('desktop_');
return name.startsWith('computer_');
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -805,7 +805,7 @@ function isReadyTurnToolAllowed(input: {
readonly profile: LocalTurnAgentProfileFacts | undefined;
}): boolean {
if (input.excludedNames.has(input.tool.def.name)) return false;
if (!isDesktopToolAvailable(input.tool, input.cuRuntimeAvailable)) return false;
if (!isComputerToolAvailable(input.tool, input.cuRuntimeAvailable)) return false;
if (
!input.selector.allowsTool(input.tool.def.name, input.options.selectorAlias, {
featureOwned: isFeatureOwnedBuiltinTool(input.profile, input.tool.def.name, input.source),
Expand Down Expand Up @@ -844,8 +844,8 @@ function isFeatureOwnedBuiltinTool(
);
}

function isDesktopToolAvailable(tool: RuntimeTool, cuRuntimeAvailable: boolean): boolean {
return cuRuntimeAvailable || !tool.def.name.startsWith('desktop_');
function isComputerToolAvailable(tool: RuntimeTool, cuRuntimeAvailable: boolean): boolean {
return cuRuntimeAvailable || !tool.def.name.startsWith('computer_');
}

/** `mcpServers` applies to MCP tools only; without a server it fails closed. */
Expand Down
Loading