feat!: merge mcp.json into agentcore.json#605
Merged
Conversation
Merge upstream policyEngines feature with mcp.json→agentcore.json migration. Update PolicyEnginePrimitive to use readProjectSpec instead of readMcpSpec.
The vended CDK project reads gateway fields from agentcore.json but the published @aws/agentcore-cdk type doesn't include them yet. Use 'as any' cast for forward-compatibility.
Contributor
Code reviewFound 4 issues:
agentcore-cli/src/cli/tui/screens/schema/McpGuidedEditor.tsx Lines 73 to 76 in 81e3202
agentcore-cli/src/cli/commands/deploy/actions.ts Lines 84 to 86 in 81e3202
agentcore-cli/src/schema/schemas/agentcore-project.ts Lines 209 to 215 in 81e3202
agentcore-cli/src/schema/schemas/agentcore-project.ts Lines 209 to 215 in 81e3202 |
- Use SaveDocumentResult type instead of inline { ok, error } in McpGuidedEditor
- Use Pick<AgentCoreMcpSpec, 'agentCoreGateways'> instead of inline type in deploy actions
- Add uniqueBy validation to agentCoreGateways, mcpRuntimeTools, unassignedTargets arrays
- Add .strict() to AgentCoreProjectSpecSchema to reject unknown fields
Contributor
Author
|
Fixed all 4 in ef28a16:
|
tejaskash
approved these changes
Mar 24, 2026
Contributor
tejaskash
left a comment
There was a problem hiding this comment.
All 4 review comments addressed. The ok vs success naming in SaveDocumentResult is a pre-existing issue beyond this PR's scope — can be tracked separately.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Merges the separate
mcp.jsonconfiguration file intoagentcore.jsonas a breaking change. Gateway and MCP tool definitions are now stored alongside the rest of the project spec in a single file, simplifying configuration management.CDK PR: https://github.com/aws/agentcore-l3-cdk-constructs/pull/99
Key changes:
readMcpSpec()/writeMcpSpec()from ConfigIO; all reads/writes go throughreadProjectSpec()/writeProjectSpec()agentCoreGatewaysandmcpRuntimeToolsfields toAgentCoreProjectSpecSchemawith.default([])extractMcpSpec()helper for backwards-compatible MCP type extractiongetMcpConfigPath()from PathResolverRelated Issue
Closes #611
Documentation PR
N/A
Type of Change
Testing
How have you tested the change?
npm run test:unitandnpm run test:integnpm run typechecknpm run lintsrc/assets/, I rannpm run test:update-snapshotsand committed the updated snapshotsChecklist
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the
terms of your choice.