fix(patch): cherry-pick 931e668 to release/v0.33.0-preview.4-pr-21425 [CONFLICTS]#21478
Conversation
# Conflicts: # integration-tests/policy-headless.test.ts # packages/core/src/tools/mcp-tool.test.ts # packages/core/src/tools/mcp-tool.ts # packages/core/src/tools/tool-registry.test.ts
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request addresses a significant refactoring of how Multi-Cloud Platform (MCP) tools are named and managed within the system. The changes introduce a standardized naming convention for MCP tools and update the policy enforcement mechanisms to leverage this new structure, enhancing the reliability and clarity of tool identification and access control. This is an automated cherry-pick with detected merge conflicts that require manual resolution. Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces a significant and valuable refactoring to standardize the naming convention for MCP tools to a fully qualified name (FQN) format, like mcp_server_tool. This change improves the robustness and security of the policy engine by making tool identification more explicit and less prone to spoofing. The updates across the test suite and core logic appear consistent with this goal.
However, a critical issue is that several files (packages/core/src/tools/mcp-tool.ts, packages/core/src/tools/mcp-tool.test.ts, and packages/core/src/tools/tool-registry.test.ts) contain unresolved merge conflict markers. These must be resolved before the PR can be merged, as they will cause the build to fail.
Note: Security Review did not run due to the size of the PR.
| <<<<<<< HEAD | ||
| import { DiscoveredMCPTool, generateValidName } from './mcp-tool.js'; // Added getStringifiedResultForDisplay | ||
| import type { ToolResult } from './tools.js'; | ||
| import { ToolConfirmationOutcome } from './tools.js'; // Added ToolConfirmationOutcome | ||
| ======= | ||
| import { | ||
| DiscoveredMCPTool, | ||
| generateValidName, | ||
| formatMcpToolName, | ||
| } from './mcp-tool.js'; // Added getStringifiedResultForDisplay | ||
| import { ToolConfirmationOutcome, type ToolResult } from './tools.js'; | ||
| >>>>>>> 931e668b4 (refactor(core): standardize MCP tool naming to mcp_ FQN format (#21425)) |
There was a problem hiding this comment.
This test file has unresolved merge conflict markers in the import statements. This must be fixed for the tests to compile and run. Please merge the imports to include formatMcpToolName and the ToolResult type correctly.
import {
DiscoveredMCPTool,
generateValidName,
formatMcpToolName,
} from './mcp-tool.js'; // Added getStringifiedResultForDisplay
import { ToolConfirmationOutcome, type ToolResult } from './tools.js';
packages/core/src/tools/mcp-tool.ts
Outdated
| <<<<<<< HEAD | ||
| import type { | ||
| ToolCallConfirmationDetails, | ||
| ToolInvocation, | ||
| ToolMcpConfirmationDetails, | ||
| ToolResult, | ||
| PolicyUpdateOptions, | ||
| } from './tools.js'; | ||
| ======= | ||
| import { debugLogger } from '../utils/debugLogger.js'; | ||
| >>>>>>> 931e668b4 (refactor(core): standardize MCP tool naming to mcp_ FQN format (#21425)) |
There was a problem hiding this comment.
This file contains unresolved merge conflict markers. This is a critical issue that will prevent the code from compiling. Please resolve the conflict by merging the imports correctly. It appears both the type imports from ./tools.js and the debugLogger import are needed.
import type {
ToolCallConfirmationDetails,
ToolInvocation,
ToolMcpConfirmationDetails,
ToolResult,
PolicyUpdateOptions,
} from './tools.js';
import { debugLogger } from '../utils/debugLogger.js';| <<<<<<< HEAD | ||
| import { DiscoveredMCPTool, MCP_QUALIFIED_NAME_SEPARATOR } from './mcp-tool.js'; | ||
| import type { FunctionDeclaration, CallableTool } from '@google/genai'; | ||
| import { mcpToTool } from '@google/genai'; | ||
| ======= | ||
| import { DiscoveredMCPTool } from './mcp-tool.js'; | ||
| import { | ||
| mcpToTool, | ||
| type FunctionDeclaration, | ||
| type CallableTool, | ||
| } from '@google/genai'; | ||
| >>>>>>> 931e668b4 (refactor(core): standardize MCP tool naming to mcp_ FQN format (#21425)) |
There was a problem hiding this comment.
|
Size Change: -145 B (0%) Total Size: 25.9 MB ℹ️ View Unchanged
|
… limits on absolute symlinked url
a6256cd
into
release/v0.33.0-preview.4-pr-21425
This PR automatically cherry-picks commit 931e668 to patch version v0.33.0-preview.4 in the preview release to create version 0.33.0-preview.5.
This cherry-pick resulted in merge conflicts that need manual resolution.
🔧 Next Steps:
📋 Files with conflicts:
The commit has been created with conflict markers for easier manual resolution.
🚨 Important: