@aws/nx-plugin 0.50.0 → 0.51.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/infra/app/__snapshots__/generator.spec.ts.snap +4 -4
- package/src/py/mcp-server/__snapshots__/generator.spec.ts.snap +15 -72
- package/src/py/strands-agent/__snapshots__/generator.spec.ts.snap +15 -72
- package/src/ts/mcp-server/__snapshots__/generator.spec.ts.snap +15 -72
- package/src/ts/react-website/app/__snapshots__/generator.spec.ts.snap +3 -3
- package/src/utils/agent-core-constructs/agent-core-constructs.js +0 -3
- package/src/utils/agent-core-constructs/agent-core-constructs.js.map +1 -1
- package/src/utils/agent-core-constructs/files/cdk/core/agent-core/runtime.ts.template +15 -72
- package/src/utils/versions.d.ts +3 -4
- package/src/utils/versions.js +2 -3
- package/src/utils/versions.js.map +1 -1
package/package.json
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
exports[`infra generator > should add required dependencies to package.json > dependencies 1`] = `
|
|
4
4
|
{
|
|
5
|
-
"aws-cdk": "2.
|
|
6
|
-
"aws-cdk-lib": "2.
|
|
5
|
+
"aws-cdk": "2.1029.3",
|
|
6
|
+
"aws-cdk-lib": "2.217.0",
|
|
7
7
|
"constructs": "10.4.2",
|
|
8
8
|
"esbuild": "0.25.9",
|
|
9
9
|
"source-map-support": "0.5.21",
|
|
@@ -42,8 +42,8 @@ exports[`infra generator > should add required dependencies to package.json > de
|
|
|
42
42
|
exports[`infra generator > should add required dependencies to package.json > package-json 1`] = `
|
|
43
43
|
{
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"aws-cdk": "2.
|
|
46
|
-
"aws-cdk-lib": "2.
|
|
45
|
+
"aws-cdk": "2.1029.3",
|
|
46
|
+
"aws-cdk-lib": "2.217.0",
|
|
47
47
|
"constructs": "10.4.2",
|
|
48
48
|
"esbuild": "0.25.9",
|
|
49
49
|
"source-map-support": "0.5.21",
|
|
@@ -11,15 +11,9 @@ exports[`py#mcp-server generator > should match snapshot for BedrockAgentCoreRun
|
|
|
11
11
|
Grant,
|
|
12
12
|
IPrincipal,
|
|
13
13
|
} from 'aws-cdk-lib/aws-iam';
|
|
14
|
-
import {
|
|
15
|
-
AwsCustomResource,
|
|
16
|
-
AwsCustomResourcePolicy,
|
|
17
|
-
PhysicalResourceId,
|
|
18
|
-
PhysicalResourceIdReference,
|
|
19
|
-
} from 'aws-cdk-lib/custom-resources';
|
|
20
14
|
import { Construct } from 'constructs';
|
|
21
|
-
import type { AuthorizerConfiguration } from '@aws-sdk/client-bedrock-agentcore-control';
|
|
22
15
|
import { Stack } from 'aws-cdk-lib';
|
|
16
|
+
import { CfnRuntime } from 'aws-cdk-lib/aws-bedrockagentcore';
|
|
23
17
|
|
|
24
18
|
/**
|
|
25
19
|
* Options for the AgentCoreRuntime construct
|
|
@@ -30,7 +24,7 @@ export interface AgentCoreRuntimeProps {
|
|
|
30
24
|
containerUri: string;
|
|
31
25
|
serverProtocol: 'MCP' | 'HTTP';
|
|
32
26
|
environment?: Record<string, string>;
|
|
33
|
-
authorizerConfiguration?:
|
|
27
|
+
authorizerConfiguration?: CfnRuntime.AuthorizerConfigurationProperty;
|
|
34
28
|
}
|
|
35
29
|
|
|
36
30
|
/**
|
|
@@ -135,75 +129,24 @@ export class AgentCoreRuntime extends Construct implements IGrantable {
|
|
|
135
129
|
});
|
|
136
130
|
this.grantPrincipal = this.role.grantPrincipal;
|
|
137
131
|
|
|
138
|
-
const agentRuntime = new
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
agentRuntimeName: props.runtimeName,
|
|
144
|
-
agentRuntimeArtifact: {
|
|
145
|
-
containerConfiguration: {
|
|
146
|
-
containerUri: props.containerUri,
|
|
147
|
-
},
|
|
148
|
-
},
|
|
149
|
-
description: props.description,
|
|
150
|
-
environmentVariables: props.environment,
|
|
151
|
-
networkConfiguration: {
|
|
152
|
-
networkMode: 'PUBLIC',
|
|
153
|
-
},
|
|
154
|
-
protocolConfiguration: {
|
|
155
|
-
serverProtocol: props.serverProtocol,
|
|
156
|
-
},
|
|
157
|
-
roleArn: this.role.roleArn,
|
|
158
|
-
authorizerConfiguration: props.authorizerConfiguration,
|
|
159
|
-
},
|
|
160
|
-
physicalResourceId: PhysicalResourceId.fromResponse('agentRuntimeId'),
|
|
161
|
-
},
|
|
162
|
-
onUpdate: {
|
|
163
|
-
service: 'bedrock-agentcore-control',
|
|
164
|
-
action: 'UpdateAgentRuntime',
|
|
165
|
-
parameters: {
|
|
166
|
-
agentRuntimeId: new PhysicalResourceIdReference(),
|
|
167
|
-
agentRuntimeName: props.runtimeName,
|
|
168
|
-
agentRuntimeArtifact: {
|
|
169
|
-
containerConfiguration: {
|
|
170
|
-
containerUri: props.containerUri,
|
|
171
|
-
},
|
|
172
|
-
},
|
|
173
|
-
description: props.description,
|
|
174
|
-
environmentVariables: props.environment,
|
|
175
|
-
networkConfiguration: {
|
|
176
|
-
networkMode: 'PUBLIC',
|
|
177
|
-
},
|
|
178
|
-
protocolConfiguration: {
|
|
179
|
-
serverProtocol: props.serverProtocol,
|
|
180
|
-
},
|
|
181
|
-
roleArn: this.role.roleArn,
|
|
182
|
-
authorizerConfiguration: props.authorizerConfiguration,
|
|
132
|
+
const agentRuntime = new CfnRuntime(this, 'MCPServerRuntime', {
|
|
133
|
+
agentRuntimeName: props.runtimeName,
|
|
134
|
+
agentRuntimeArtifact: {
|
|
135
|
+
containerConfiguration: {
|
|
136
|
+
containerUri: props.containerUri,
|
|
183
137
|
},
|
|
184
|
-
physicalResourceId: PhysicalResourceId.fromResponse('agentRuntimeId'),
|
|
185
138
|
},
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
agentRuntimeId: new PhysicalResourceIdReference(),
|
|
191
|
-
},
|
|
139
|
+
description: props.description,
|
|
140
|
+
environmentVariables: props.environment,
|
|
141
|
+
networkConfiguration: {
|
|
142
|
+
networkMode: 'PUBLIC',
|
|
192
143
|
},
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
resources: ['*'],
|
|
197
|
-
}),
|
|
198
|
-
new PolicyStatement({
|
|
199
|
-
actions: ['iam:PassRole'],
|
|
200
|
-
resources: [this.role.roleArn],
|
|
201
|
-
}),
|
|
202
|
-
]),
|
|
203
|
-
installLatestAwsSdk: true,
|
|
144
|
+
protocolConfiguration: props.serverProtocol,
|
|
145
|
+
roleArn: this.role.roleArn,
|
|
146
|
+
authorizerConfiguration: props.authorizerConfiguration,
|
|
204
147
|
});
|
|
205
148
|
|
|
206
|
-
this.arn = agentRuntime.
|
|
149
|
+
this.arn = agentRuntime.attrAgentRuntimeArn;
|
|
207
150
|
}
|
|
208
151
|
|
|
209
152
|
/**
|
|
@@ -72,15 +72,9 @@ exports[`py#strands-agent generator > should match snapshot for BedrockAgentCore
|
|
|
72
72
|
Grant,
|
|
73
73
|
IPrincipal,
|
|
74
74
|
} from 'aws-cdk-lib/aws-iam';
|
|
75
|
-
import {
|
|
76
|
-
AwsCustomResource,
|
|
77
|
-
AwsCustomResourcePolicy,
|
|
78
|
-
PhysicalResourceId,
|
|
79
|
-
PhysicalResourceIdReference,
|
|
80
|
-
} from 'aws-cdk-lib/custom-resources';
|
|
81
75
|
import { Construct } from 'constructs';
|
|
82
|
-
import type { AuthorizerConfiguration } from '@aws-sdk/client-bedrock-agentcore-control';
|
|
83
76
|
import { Stack } from 'aws-cdk-lib';
|
|
77
|
+
import { CfnRuntime } from 'aws-cdk-lib/aws-bedrockagentcore';
|
|
84
78
|
|
|
85
79
|
/**
|
|
86
80
|
* Options for the AgentCoreRuntime construct
|
|
@@ -91,7 +85,7 @@ export interface AgentCoreRuntimeProps {
|
|
|
91
85
|
containerUri: string;
|
|
92
86
|
serverProtocol: 'MCP' | 'HTTP';
|
|
93
87
|
environment?: Record<string, string>;
|
|
94
|
-
authorizerConfiguration?:
|
|
88
|
+
authorizerConfiguration?: CfnRuntime.AuthorizerConfigurationProperty;
|
|
95
89
|
}
|
|
96
90
|
|
|
97
91
|
/**
|
|
@@ -196,75 +190,24 @@ export class AgentCoreRuntime extends Construct implements IGrantable {
|
|
|
196
190
|
});
|
|
197
191
|
this.grantPrincipal = this.role.grantPrincipal;
|
|
198
192
|
|
|
199
|
-
const agentRuntime = new
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
agentRuntimeName: props.runtimeName,
|
|
205
|
-
agentRuntimeArtifact: {
|
|
206
|
-
containerConfiguration: {
|
|
207
|
-
containerUri: props.containerUri,
|
|
208
|
-
},
|
|
209
|
-
},
|
|
210
|
-
description: props.description,
|
|
211
|
-
environmentVariables: props.environment,
|
|
212
|
-
networkConfiguration: {
|
|
213
|
-
networkMode: 'PUBLIC',
|
|
214
|
-
},
|
|
215
|
-
protocolConfiguration: {
|
|
216
|
-
serverProtocol: props.serverProtocol,
|
|
217
|
-
},
|
|
218
|
-
roleArn: this.role.roleArn,
|
|
219
|
-
authorizerConfiguration: props.authorizerConfiguration,
|
|
220
|
-
},
|
|
221
|
-
physicalResourceId: PhysicalResourceId.fromResponse('agentRuntimeId'),
|
|
222
|
-
},
|
|
223
|
-
onUpdate: {
|
|
224
|
-
service: 'bedrock-agentcore-control',
|
|
225
|
-
action: 'UpdateAgentRuntime',
|
|
226
|
-
parameters: {
|
|
227
|
-
agentRuntimeId: new PhysicalResourceIdReference(),
|
|
228
|
-
agentRuntimeName: props.runtimeName,
|
|
229
|
-
agentRuntimeArtifact: {
|
|
230
|
-
containerConfiguration: {
|
|
231
|
-
containerUri: props.containerUri,
|
|
232
|
-
},
|
|
233
|
-
},
|
|
234
|
-
description: props.description,
|
|
235
|
-
environmentVariables: props.environment,
|
|
236
|
-
networkConfiguration: {
|
|
237
|
-
networkMode: 'PUBLIC',
|
|
238
|
-
},
|
|
239
|
-
protocolConfiguration: {
|
|
240
|
-
serverProtocol: props.serverProtocol,
|
|
241
|
-
},
|
|
242
|
-
roleArn: this.role.roleArn,
|
|
243
|
-
authorizerConfiguration: props.authorizerConfiguration,
|
|
193
|
+
const agentRuntime = new CfnRuntime(this, 'MCPServerRuntime', {
|
|
194
|
+
agentRuntimeName: props.runtimeName,
|
|
195
|
+
agentRuntimeArtifact: {
|
|
196
|
+
containerConfiguration: {
|
|
197
|
+
containerUri: props.containerUri,
|
|
244
198
|
},
|
|
245
|
-
physicalResourceId: PhysicalResourceId.fromResponse('agentRuntimeId'),
|
|
246
199
|
},
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
agentRuntimeId: new PhysicalResourceIdReference(),
|
|
252
|
-
},
|
|
200
|
+
description: props.description,
|
|
201
|
+
environmentVariables: props.environment,
|
|
202
|
+
networkConfiguration: {
|
|
203
|
+
networkMode: 'PUBLIC',
|
|
253
204
|
},
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
resources: ['*'],
|
|
258
|
-
}),
|
|
259
|
-
new PolicyStatement({
|
|
260
|
-
actions: ['iam:PassRole'],
|
|
261
|
-
resources: [this.role.roleArn],
|
|
262
|
-
}),
|
|
263
|
-
]),
|
|
264
|
-
installLatestAwsSdk: true,
|
|
205
|
+
protocolConfiguration: props.serverProtocol,
|
|
206
|
+
roleArn: this.role.roleArn,
|
|
207
|
+
authorizerConfiguration: props.authorizerConfiguration,
|
|
265
208
|
});
|
|
266
209
|
|
|
267
|
-
this.arn = agentRuntime.
|
|
210
|
+
this.arn = agentRuntime.attrAgentRuntimeArn;
|
|
268
211
|
}
|
|
269
212
|
|
|
270
213
|
/**
|
|
@@ -11,15 +11,9 @@ exports[`ts#mcp-server generator > should match snapshot for BedrockAgentCoreRun
|
|
|
11
11
|
Grant,
|
|
12
12
|
IPrincipal,
|
|
13
13
|
} from 'aws-cdk-lib/aws-iam';
|
|
14
|
-
import {
|
|
15
|
-
AwsCustomResource,
|
|
16
|
-
AwsCustomResourcePolicy,
|
|
17
|
-
PhysicalResourceId,
|
|
18
|
-
PhysicalResourceIdReference,
|
|
19
|
-
} from 'aws-cdk-lib/custom-resources';
|
|
20
14
|
import { Construct } from 'constructs';
|
|
21
|
-
import type { AuthorizerConfiguration } from '@aws-sdk/client-bedrock-agentcore-control';
|
|
22
15
|
import { Stack } from 'aws-cdk-lib';
|
|
16
|
+
import { CfnRuntime } from 'aws-cdk-lib/aws-bedrockagentcore';
|
|
23
17
|
|
|
24
18
|
/**
|
|
25
19
|
* Options for the AgentCoreRuntime construct
|
|
@@ -30,7 +24,7 @@ export interface AgentCoreRuntimeProps {
|
|
|
30
24
|
containerUri: string;
|
|
31
25
|
serverProtocol: 'MCP' | 'HTTP';
|
|
32
26
|
environment?: Record<string, string>;
|
|
33
|
-
authorizerConfiguration?:
|
|
27
|
+
authorizerConfiguration?: CfnRuntime.AuthorizerConfigurationProperty;
|
|
34
28
|
}
|
|
35
29
|
|
|
36
30
|
/**
|
|
@@ -135,75 +129,24 @@ export class AgentCoreRuntime extends Construct implements IGrantable {
|
|
|
135
129
|
});
|
|
136
130
|
this.grantPrincipal = this.role.grantPrincipal;
|
|
137
131
|
|
|
138
|
-
const agentRuntime = new
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
agentRuntimeName: props.runtimeName,
|
|
144
|
-
agentRuntimeArtifact: {
|
|
145
|
-
containerConfiguration: {
|
|
146
|
-
containerUri: props.containerUri,
|
|
147
|
-
},
|
|
148
|
-
},
|
|
149
|
-
description: props.description,
|
|
150
|
-
environmentVariables: props.environment,
|
|
151
|
-
networkConfiguration: {
|
|
152
|
-
networkMode: 'PUBLIC',
|
|
153
|
-
},
|
|
154
|
-
protocolConfiguration: {
|
|
155
|
-
serverProtocol: props.serverProtocol,
|
|
156
|
-
},
|
|
157
|
-
roleArn: this.role.roleArn,
|
|
158
|
-
authorizerConfiguration: props.authorizerConfiguration,
|
|
159
|
-
},
|
|
160
|
-
physicalResourceId: PhysicalResourceId.fromResponse('agentRuntimeId'),
|
|
161
|
-
},
|
|
162
|
-
onUpdate: {
|
|
163
|
-
service: 'bedrock-agentcore-control',
|
|
164
|
-
action: 'UpdateAgentRuntime',
|
|
165
|
-
parameters: {
|
|
166
|
-
agentRuntimeId: new PhysicalResourceIdReference(),
|
|
167
|
-
agentRuntimeName: props.runtimeName,
|
|
168
|
-
agentRuntimeArtifact: {
|
|
169
|
-
containerConfiguration: {
|
|
170
|
-
containerUri: props.containerUri,
|
|
171
|
-
},
|
|
172
|
-
},
|
|
173
|
-
description: props.description,
|
|
174
|
-
environmentVariables: props.environment,
|
|
175
|
-
networkConfiguration: {
|
|
176
|
-
networkMode: 'PUBLIC',
|
|
177
|
-
},
|
|
178
|
-
protocolConfiguration: {
|
|
179
|
-
serverProtocol: props.serverProtocol,
|
|
180
|
-
},
|
|
181
|
-
roleArn: this.role.roleArn,
|
|
182
|
-
authorizerConfiguration: props.authorizerConfiguration,
|
|
132
|
+
const agentRuntime = new CfnRuntime(this, 'MCPServerRuntime', {
|
|
133
|
+
agentRuntimeName: props.runtimeName,
|
|
134
|
+
agentRuntimeArtifact: {
|
|
135
|
+
containerConfiguration: {
|
|
136
|
+
containerUri: props.containerUri,
|
|
183
137
|
},
|
|
184
|
-
physicalResourceId: PhysicalResourceId.fromResponse('agentRuntimeId'),
|
|
185
138
|
},
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
agentRuntimeId: new PhysicalResourceIdReference(),
|
|
191
|
-
},
|
|
139
|
+
description: props.description,
|
|
140
|
+
environmentVariables: props.environment,
|
|
141
|
+
networkConfiguration: {
|
|
142
|
+
networkMode: 'PUBLIC',
|
|
192
143
|
},
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
resources: ['*'],
|
|
197
|
-
}),
|
|
198
|
-
new PolicyStatement({
|
|
199
|
-
actions: ['iam:PassRole'],
|
|
200
|
-
resources: [this.role.roleArn],
|
|
201
|
-
}),
|
|
202
|
-
]),
|
|
203
|
-
installLatestAwsSdk: true,
|
|
144
|
+
protocolConfiguration: props.serverProtocol,
|
|
145
|
+
roleArn: this.role.roleArn,
|
|
146
|
+
authorizerConfiguration: props.authorizerConfiguration,
|
|
204
147
|
});
|
|
205
148
|
|
|
206
|
-
this.arn = agentRuntime.
|
|
149
|
+
this.arn = agentRuntime.attrAgentRuntimeArn;
|
|
207
150
|
}
|
|
208
151
|
|
|
209
152
|
/**
|
|
@@ -1057,7 +1057,7 @@ exports[`react-website generator > Tanstack router integration > should generate
|
|
|
1057
1057
|
"@cloudscape-design/board-components": "3.0.117",
|
|
1058
1058
|
"@cloudscape-design/components": "3.0.1075",
|
|
1059
1059
|
"@cloudscape-design/global-styles": "1.0.45",
|
|
1060
|
-
"aws-cdk-lib": "2.
|
|
1060
|
+
"aws-cdk-lib": "2.217.0",
|
|
1061
1061
|
"constructs": "10.4.2",
|
|
1062
1062
|
"react": "19.0.0",
|
|
1063
1063
|
"react-dom": "19.0.0",
|
|
@@ -2458,7 +2458,7 @@ exports[`react-website generator > Tanstack router integration > should generate
|
|
|
2458
2458
|
"@cloudscape-design/components": "3.0.1075",
|
|
2459
2459
|
"@cloudscape-design/global-styles": "1.0.45",
|
|
2460
2460
|
"@tanstack/react-router": "1.131.28",
|
|
2461
|
-
"aws-cdk-lib": "2.
|
|
2461
|
+
"aws-cdk-lib": "2.217.0",
|
|
2462
2462
|
"constructs": "10.4.2",
|
|
2463
2463
|
"react": "19.0.0",
|
|
2464
2464
|
"react-dom": "19.0.0",
|
|
@@ -4541,7 +4541,7 @@ exports[`react-website generator > should handle npm scope prefix correctly > sc
|
|
|
4541
4541
|
"@cloudscape-design/components": "3.0.1075",
|
|
4542
4542
|
"@cloudscape-design/global-styles": "1.0.45",
|
|
4543
4543
|
"@tanstack/react-router": "1.131.28",
|
|
4544
|
-
"aws-cdk-lib": "2.
|
|
4544
|
+
"aws-cdk-lib": "2.217.0",
|
|
4545
4545
|
"constructs": "10.4.2",
|
|
4546
4546
|
"react": "19.0.0",
|
|
4547
4547
|
"react-dom": "19.0.0",
|
|
@@ -8,7 +8,6 @@ exports.addAgentInfra = exports.addMcpServerInfra = void 0;
|
|
|
8
8
|
const devkit_1 = require("@nx/devkit");
|
|
9
9
|
const shared_constructs_constants_1 = require("../shared-constructs-constants");
|
|
10
10
|
const ast_1 = require("../ast");
|
|
11
|
-
const versions_1 = require("../versions");
|
|
12
11
|
const addAgentCoreInfra = (tree, options) => {
|
|
13
12
|
switch (options.iacProvider) {
|
|
14
13
|
case 'CDK':
|
|
@@ -37,8 +36,6 @@ const addAgentCoreInfra = (tree, options) => {
|
|
|
37
36
|
});
|
|
38
37
|
};
|
|
39
38
|
const addAgentCoreCDKInfra = (tree, options) => {
|
|
40
|
-
// Construct uses bedrock agentcore types
|
|
41
|
-
(0, devkit_1.addDependenciesToPackageJson)(tree, {}, (0, versions_1.withVersions)(['@aws-sdk/client-bedrock-agentcore-control']));
|
|
42
39
|
// Add the AgentCore runtime construct
|
|
43
40
|
(0, devkit_1.generateFiles)(tree, (0, devkit_1.joinPathFragments)(__dirname, 'files', 'cdk', 'core', 'agent-core'), (0, devkit_1.joinPathFragments)(shared_constructs_constants_1.PACKAGES_DIR, shared_constructs_constants_1.SHARED_CONSTRUCTS_DIR, 'src', 'core', 'agent-core'), {}, {
|
|
44
41
|
overwriteStrategy: devkit_1.OverwriteStrategy.KeepExisting,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-core-constructs.js","sourceRoot":"","sources":["../../../../../../packages/nx-plugin/src/utils/agent-core-constructs/agent-core-constructs.ts"],"names":[],"mappings":";;;AAAA;;;GAGG;AACH,
|
|
1
|
+
{"version":3,"file":"agent-core-constructs.js","sourceRoot":"","sources":["../../../../../../packages/nx-plugin/src/utils/agent-core-constructs/agent-core-constructs.ts"],"names":[],"mappings":";;;AAAA;;;GAGG;AACH,uCAOoB;AACpB,gFAIwC;AACxC,gCAAuC;AAcvC,MAAM,iBAAiB,GA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am';
|
|
11
|
-
import {
|
|
12
|
-
AwsCustomResource,
|
|
13
|
-
AwsCustomResourcePolicy,
|
|
14
|
-
PhysicalResourceId,
|
|
15
|
-
PhysicalResourceIdReference,
|
|
16
|
-
} from 'aws-cdk-lib/custom-resources';
|
|
17
11
|
import { Construct } from 'constructs';
|
|
18
|
-
import type { AuthorizerConfiguration } from '@aws-sdk/client-bedrock-agentcore-control';
|
|
19
12
|
import { Stack } from 'aws-cdk-lib';
|
|
13
|
+
import { CfnRuntime } from 'aws-cdk-lib/aws-bedrockagentcore';
|
|
20
14
|
|
|
21
15
|
/**
|
|
22
16
|
* Options for the AgentCoreRuntime construct
|
|
@@ -27,7 +21,7 @@ export interface AgentCoreRuntimeProps {
|
|
|
27
21
|
containerUri: string;
|
|
28
22
|
serverProtocol: 'MCP' | 'HTTP';
|
|
29
23
|
environment?: Record<string, string>;
|
|
30
|
-
authorizerConfiguration?:
|
|
24
|
+
authorizerConfiguration?: CfnRuntime.AuthorizerConfigurationProperty;
|
|
31
25
|
}
|
|
32
26
|
|
|
33
27
|
/**
|
|
@@ -132,75 +126,24 @@ export class AgentCoreRuntime extends Construct implements IGrantable {
|
|
|
132
126
|
});
|
|
133
127
|
this.grantPrincipal = this.role.grantPrincipal;
|
|
134
128
|
|
|
135
|
-
const agentRuntime = new
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
agentRuntimeName: props.runtimeName,
|
|
141
|
-
agentRuntimeArtifact: {
|
|
142
|
-
containerConfiguration: {
|
|
143
|
-
containerUri: props.containerUri,
|
|
144
|
-
},
|
|
145
|
-
},
|
|
146
|
-
description: props.description,
|
|
147
|
-
environmentVariables: props.environment,
|
|
148
|
-
networkConfiguration: {
|
|
149
|
-
networkMode: 'PUBLIC',
|
|
150
|
-
},
|
|
151
|
-
protocolConfiguration: {
|
|
152
|
-
serverProtocol: props.serverProtocol,
|
|
153
|
-
},
|
|
154
|
-
roleArn: this.role.roleArn,
|
|
155
|
-
authorizerConfiguration: props.authorizerConfiguration,
|
|
156
|
-
},
|
|
157
|
-
physicalResourceId: PhysicalResourceId.fromResponse('agentRuntimeId'),
|
|
158
|
-
},
|
|
159
|
-
onUpdate: {
|
|
160
|
-
service: 'bedrock-agentcore-control',
|
|
161
|
-
action: 'UpdateAgentRuntime',
|
|
162
|
-
parameters: {
|
|
163
|
-
agentRuntimeId: new PhysicalResourceIdReference(),
|
|
164
|
-
agentRuntimeName: props.runtimeName,
|
|
165
|
-
agentRuntimeArtifact: {
|
|
166
|
-
containerConfiguration: {
|
|
167
|
-
containerUri: props.containerUri,
|
|
168
|
-
},
|
|
169
|
-
},
|
|
170
|
-
description: props.description,
|
|
171
|
-
environmentVariables: props.environment,
|
|
172
|
-
networkConfiguration: {
|
|
173
|
-
networkMode: 'PUBLIC',
|
|
174
|
-
},
|
|
175
|
-
protocolConfiguration: {
|
|
176
|
-
serverProtocol: props.serverProtocol,
|
|
177
|
-
},
|
|
178
|
-
roleArn: this.role.roleArn,
|
|
179
|
-
authorizerConfiguration: props.authorizerConfiguration,
|
|
129
|
+
const agentRuntime = new CfnRuntime(this, 'MCPServerRuntime', {
|
|
130
|
+
agentRuntimeName: props.runtimeName,
|
|
131
|
+
agentRuntimeArtifact: {
|
|
132
|
+
containerConfiguration: {
|
|
133
|
+
containerUri: props.containerUri,
|
|
180
134
|
},
|
|
181
|
-
physicalResourceId: PhysicalResourceId.fromResponse('agentRuntimeId'),
|
|
182
135
|
},
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
agentRuntimeId: new PhysicalResourceIdReference(),
|
|
188
|
-
},
|
|
136
|
+
description: props.description,
|
|
137
|
+
environmentVariables: props.environment,
|
|
138
|
+
networkConfiguration: {
|
|
139
|
+
networkMode: 'PUBLIC',
|
|
189
140
|
},
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
resources: ['*'],
|
|
194
|
-
}),
|
|
195
|
-
new PolicyStatement({
|
|
196
|
-
actions: ['iam:PassRole'],
|
|
197
|
-
resources: [this.role.roleArn],
|
|
198
|
-
}),
|
|
199
|
-
]),
|
|
200
|
-
installLatestAwsSdk: true,
|
|
141
|
+
protocolConfiguration: props.serverProtocol,
|
|
142
|
+
roleArn: this.role.roleArn,
|
|
143
|
+
authorizerConfiguration: props.authorizerConfiguration,
|
|
201
144
|
});
|
|
202
145
|
|
|
203
|
-
this.arn = agentRuntime.
|
|
146
|
+
this.arn = agentRuntime.attrAgentRuntimeArn;
|
|
204
147
|
}
|
|
205
148
|
|
|
206
149
|
/**
|
package/src/utils/versions.d.ts
CHANGED
|
@@ -9,7 +9,6 @@ export declare const TS_VERSIONS: {
|
|
|
9
9
|
readonly '@aws-sdk/client-cognito-identity': "3.876.0";
|
|
10
10
|
readonly '@aws-sdk/credential-providers': "3.876.0";
|
|
11
11
|
readonly '@aws-sdk/credential-provider-cognito-identity': "3.876.0";
|
|
12
|
-
readonly '@aws-sdk/client-bedrock-agentcore-control': "3.876.0";
|
|
13
12
|
readonly '@aws-smithy/server-apigateway': "1.0.0-alpha.10";
|
|
14
13
|
readonly '@aws-smithy/server-node': "1.0.0-alpha.10";
|
|
15
14
|
readonly '@aws-lambda-powertools/logger': "2.25.2";
|
|
@@ -41,8 +40,8 @@ export declare const TS_VERSIONS: {
|
|
|
41
40
|
readonly '@types/express': "5.0.3";
|
|
42
41
|
readonly '@smithy/types': "4.3.2";
|
|
43
42
|
readonly aws4fetch: "1.0.20";
|
|
44
|
-
readonly 'aws-cdk': "2.
|
|
45
|
-
readonly 'aws-cdk-lib': "2.
|
|
43
|
+
readonly 'aws-cdk': "2.1029.3";
|
|
44
|
+
readonly 'aws-cdk-lib': "2.217.0";
|
|
46
45
|
readonly 'aws-xray-sdk-core': "3.10.3";
|
|
47
46
|
readonly constructs: "10.4.2";
|
|
48
47
|
readonly cors: "2.8.5";
|
|
@@ -70,7 +69,7 @@ export type ITsDepVersion = keyof typeof TS_VERSIONS;
|
|
|
70
69
|
* Add versions to the given dependencies
|
|
71
70
|
*/
|
|
72
71
|
export declare const withVersions: (deps: ITsDepVersion[]) => {
|
|
73
|
-
[k: string]: "3.876.0" | "1.0.0-alpha.10" | "2.25.2" | "6.4.4" | "21.2.0" | "9.0.0" | "21.4.1" | "1.17.4" | "0.16.5" | "1.131.28" | "1.131.2" | "3.0.117" | "3.0.1075" | "1.0.45" | "5.87.4" | "11.0.0" | "22.18.0" | "8.10.152" | "2.8.19" | "5.0.3" | "4.3.2" | "1.0.20" | "2.
|
|
72
|
+
[k: string]: "3.876.0" | "1.0.0-alpha.10" | "2.25.2" | "6.4.4" | "21.2.0" | "9.0.0" | "21.4.1" | "1.17.4" | "0.16.5" | "1.131.28" | "1.131.2" | "3.0.117" | "3.0.1075" | "1.0.45" | "5.87.4" | "11.0.0" | "22.18.0" | "8.10.152" | "2.8.19" | "5.0.3" | "4.3.2" | "1.0.20" | "2.1029.3" | "2.217.0" | "3.10.3" | "10.4.2" | "2.8.5" | "0.25.9" | "5.5.4" | "5.1.0" | "2.4.0" | "4.0.0" | "2.0.0" | "3.3.0" | "3.6.2" | "6.0.1" | "1.0.0-beta.38" | "0.5.21" | "4.1.12" | "4.20.1" | "5.1.4" | "4.1.5" | "npm:zod@^3";
|
|
74
73
|
};
|
|
75
74
|
/**
|
|
76
75
|
* Versions for Python dependencies added by generators
|
package/src/utils/versions.js
CHANGED
|
@@ -12,7 +12,6 @@ exports.TS_VERSIONS = {
|
|
|
12
12
|
'@aws-sdk/client-cognito-identity': '3.876.0',
|
|
13
13
|
'@aws-sdk/credential-providers': '3.876.0',
|
|
14
14
|
'@aws-sdk/credential-provider-cognito-identity': '3.876.0',
|
|
15
|
-
'@aws-sdk/client-bedrock-agentcore-control': '3.876.0',
|
|
16
15
|
'@aws-smithy/server-apigateway': '1.0.0-alpha.10',
|
|
17
16
|
'@aws-smithy/server-node': '1.0.0-alpha.10',
|
|
18
17
|
'@aws-lambda-powertools/logger': '2.25.2',
|
|
@@ -44,8 +43,8 @@ exports.TS_VERSIONS = {
|
|
|
44
43
|
'@types/express': '5.0.3',
|
|
45
44
|
'@smithy/types': '4.3.2',
|
|
46
45
|
aws4fetch: '1.0.20',
|
|
47
|
-
'aws-cdk': '2.
|
|
48
|
-
'aws-cdk-lib': '2.
|
|
46
|
+
'aws-cdk': '2.1029.3',
|
|
47
|
+
'aws-cdk-lib': '2.217.0',
|
|
49
48
|
'aws-xray-sdk-core': '3.10.3',
|
|
50
49
|
constructs: '10.4.2',
|
|
51
50
|
cors: '2.8.5',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"versions.js","sourceRoot":"","sources":["../../../../../packages/nx-plugin/src/utils/versions.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH;;GAEG;AACU,QAAA,WAAW,GAAG;IACzB,kCAAkC,EAAE,SAAS;IAC7C,+BAA+B,EAAE,SAAS;IAC1C,+CAA+C,EAAE,SAAS;IAC1D
|
|
1
|
+
{"version":3,"file":"versions.js","sourceRoot":"","sources":["../../../../../packages/nx-plugin/src/utils/versions.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH;;GAEG;AACU,QAAA,WAAW,GAAG;IACzB,kCAAkC,EAAE,SAAS;IAC7C,+BAA+B,EAAE,SAAS;IAC1C,+CAA+C,EAAE,SAAS;IAC1D,+BAA+B,EAAE,gBAAgB;IACjD,yBAAyB,EAAE,gBAAgB;IAC3C,+BAA+B,EAAE,QAAQ;IACzC,gCAAgC,EAAE,QAAQ;IAC1C,+BAA+B,EAAE,QAAQ;IACzC,+BAA+B,EAAE,QAAQ;IACzC,aAAa,EAAE,OAAO;IACtB,cAAc,EAAE,QAAQ;IACxB,sBAAsB,EAAE,OAAO;IAC/B,YAAY,EAAE,QAAQ;IACtB,2BAA2B,EAAE,QAAQ;IACrC,iCAAiC,EAAE,QAAQ;IAC3C,wBAAwB,EAAE,UAAU;IACpC,yBAAyB,EAAE,UAAU;IACrC,4BAA4B,EAAE,UAAU;IACxC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