Description
Make an omitted Gateway protocolType consistently mean an unrestricted
Gateway across the old CLI, project schema, and L3 construct.
The current project contract has an unintuitive compatibility mapping:
agentcore.json value |
Current behavior |
| omitted |
MCP-only |
"MCP" |
MCP-only |
"None" |
unrestricted; L3 omits the service field |
The AgentCore service itself uses omission for an unrestricted Gateway and
explicit "MCP" for an MCP-only Gateway. The CLI contract should align:
agentcore.json value |
Desired behavior |
| omitted |
unrestricted |
"MCP" |
MCP-only |
"None" |
accepted as a legacy unrestricted value |
The command experience should be:
# Unrestricted; protocolType omitted
agentcore add gateway --name tools
# MCP-only
agentcore add gateway --name tools --protocol-type MCP
This needs a coordinated compatibility migration. Existing schema-v1 projects
with omitted protocolType historically mean MCP, and imported MCP Gateways are
currently persisted with the field omitted. Those projects must not silently
become unrestricted when the L3 default changes.
This was intentionally deferred from #2028 so that PR can
preserve the currently published schema and L3 behavior.
Acceptance Criteria
Additional Context
This is a cross-repository compatibility change involving:
- old CLI authoring, import, migration, generated CDK, and dependency pinning;
- project-based refactor command and schema behavior;
aws/agentcore-l3-cdk-constructs schema and Gateway synthesis.
Description
Make an omitted Gateway
protocolTypeconsistently mean an unrestrictedGateway across the old CLI, project schema, and L3 construct.
The current project contract has an unintuitive compatibility mapping:
agentcore.jsonvalue"MCP""None"The AgentCore service itself uses omission for an unrestricted Gateway and
explicit
"MCP"for an MCP-only Gateway. The CLI contract should align:agentcore.jsonvalue"MCP""None"The command experience should be:
This needs a coordinated compatibility migration. Existing schema-v1 projects
with omitted
protocolTypehistorically mean MCP, and imported MCP Gateways arecurrently persisted with the field omitted. Those projects must not silently
become unrestricted when the L3 default changes.
This was intentionally deferred from #2028 so that PR can
preserve the currently published schema and L3 behavior.
Acceptance Criteria
--protocol-typein the old CLI persists noprotocolTypefield and deploys an unrestricted Gateway.--protocol-type MCPpersists"protocolType": "MCP"and deploys an MCP-only Gateway.--protocol-type None; existing"None"project values remain valid."protocolType": "MCP"."MCP"before consuming the new L3 behavior.protocolTypeas unrestricted and explicit"MCP"as MCP-only.Additional Context
This is a cross-repository compatibility change involving:
aws/agentcore-l3-cdk-constructsschema and Gateway synthesis.