File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -73,12 +73,17 @@ async function main() {
7373 const spec = await configIO .readProjectSpec ();
7474 const targets = await configIO .readAWSDeploymentTargets ();
7575
76- // Extract MCP configuration from project spec
77- const mcpSpec = spec .agentCoreGateways ? .length
76+ // Extract MCP configuration from project spec.
77+ // Gateway fields are stored in agentcore.json but may not yet be on the
78+ // AgentCoreProjectSpec type from @aws/agentcore-cdk, so we read them
79+ // dynamically and cast the resulting object.
80+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
81+ const specAny = spec as any ;
82+ const mcpSpec = specAny .agentCoreGateways ? .length
7883 ? {
79- agentCoreGateways: spec .agentCoreGateways ,
80- mcpRuntimeTools: spec .mcpRuntimeTools ,
81- unassignedTargets: spec .unassignedTargets ,
84+ agentCoreGateways: specAny .agentCoreGateways ,
85+ mcpRuntimeTools: specAny .mcpRuntimeTools ,
86+ unassignedTargets: specAny .unassignedTargets ,
8287 }
8388 : undefined ;
8489
Original file line number Diff line number Diff line change @@ -28,12 +28,17 @@ async function main() {
2828 const spec = await configIO . readProjectSpec ( ) ;
2929 const targets = await configIO . readAWSDeploymentTargets ( ) ;
3030
31- // Extract MCP configuration from project spec
32- const mcpSpec = spec . agentCoreGateways ?. length
31+ // Extract MCP configuration from project spec.
32+ // Gateway fields are stored in agentcore.json but may not yet be on the
33+ // AgentCoreProjectSpec type from @aws /agentcore-cdk, so we read them
34+ // dynamically and cast the resulting object.
35+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
36+ const specAny = spec as any ;
37+ const mcpSpec = specAny . agentCoreGateways ?. length
3338 ? {
34- agentCoreGateways : spec . agentCoreGateways ,
35- mcpRuntimeTools : spec . mcpRuntimeTools ,
36- unassignedTargets : spec . unassignedTargets ,
39+ agentCoreGateways : specAny . agentCoreGateways ,
40+ mcpRuntimeTools : specAny . mcpRuntimeTools ,
41+ unassignedTargets : specAny . unassignedTargets ,
3742 }
3843 : undefined ;
3944
You can’t perform that action at this time.
0 commit comments