@aws/nx-plugin-mcp 1.0.0-rc.2 → 1.0.0-rc.21
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/bin/aws-nx-mcp.js +5919 -4776
- package/docs/guides/agentcore-gateway.mdx +240 -0
- package/docs/guides/connection/agentcore-gateway-gateway.mdx +154 -0
- package/docs/guides/connection/agentcore-gateway-mcp.mdx +134 -0
- package/docs/guides/connection/py-agent-a2a.mdx +8 -5
- package/docs/guides/connection/py-agent-dynamodb.mdx +116 -0
- package/docs/guides/connection/py-agent-gateway.mdx +161 -0
- package/docs/guides/connection/py-agent-mcp.mdx +7 -4
- package/docs/guides/connection/py-fast-api-dynamodb.mdx +56 -0
- package/docs/guides/connection/py-mcp-server-dynamodb.mdx +116 -0
- package/docs/guides/connection/react-smithy.mdx +1 -1
- package/docs/guides/connection/react-trpc.mdx +1 -1
- package/docs/guides/connection/smithy-dynamodb.mdx +68 -0
- package/docs/guides/connection/smithy-rdb.mdx +1 -1
- package/docs/guides/connection/trpc-dynamodb.mdx +62 -0
- package/docs/guides/connection/trpc-rdb.mdx +1 -1
- package/docs/guides/connection/ts-agent-a2a.mdx +8 -5
- package/docs/guides/connection/ts-agent-dynamodb.mdx +128 -0
- package/docs/guides/connection/ts-agent-gateway.mdx +152 -0
- package/docs/guides/connection/ts-agent-mcp.mdx +7 -4
- package/docs/guides/connection/ts-mcp-server-dynamodb.mdx +125 -0
- package/docs/guides/connection.mdx +89 -0
- package/docs/guides/docker-bundling.mdx +13 -7
- package/docs/guides/fastapi.mdx +213 -3
- package/docs/guides/license.mdx +264 -109
- package/docs/guides/local-development.mdx +76 -0
- package/docs/guides/nx-generator.mdx +5 -0
- package/docs/guides/py-agent.mdx +42 -3
- package/docs/guides/py-dynamodb.mdx +449 -0
- package/docs/guides/py-mcp-server.mdx +5 -1
- package/docs/guides/react-website-auth.mdx +15 -0
- package/docs/guides/react-website.mdx +12 -4
- package/docs/guides/trpc.mdx +8 -8
- package/docs/guides/ts-agent.mdx +40 -2
- package/docs/guides/ts-dynamodb.mdx +158 -0
- package/docs/guides/ts-mcp-server.mdx +5 -1
- package/docs/guides/ts-rdb.mdx +58 -10
- package/docs/guides/ts-smithy-api.mdx +148 -3
- package/docs/guides/typescript-project.mdx +5 -10
- package/docs/guides/workspace.mdx +8 -2
- package/docs/snippets/api/type-safe-api-integrations.mdx +31 -0
- package/docs/snippets/api/waf-configuration.mdx +1 -1
- package/docs/snippets/connection/dynamodb-local-development.mdx +7 -0
- package/docs/snippets/connection/lambda-dynamodb-access.mdx +80 -0
- package/docs/snippets/connection/py-dynamodb-local-development.mdx +7 -0
- package/docs/snippets/dynamodb/deploying-table.mdx +171 -0
- package/docs/snippets/dynamodb/gsi-config.mdx +38 -0
- package/docs/snippets/dynamodb/infrastructure.mdx +33 -0
- package/docs/snippets/dynamodb/serve-local-start.mdx +13 -0
- package/docs/snippets/dynamodb/serve-local-windows.mdx +15 -0
- package/docs/snippets/mcp/config.mdx +1 -1
- package/docs/snippets/required-prerequisites.mdx +1 -1
- package/generators.json +100 -1
- package/package.json +1 -1
- package/src/agentcore-gateway/gateway-connection/schema.json +26 -0
- package/src/agentcore-gateway/mcp-connection/schema.json +26 -0
- package/src/agentcore-gateway/schema.json +65 -0
- package/src/license/schema.json +6 -0
- package/src/preset/schema.json +5 -0
- package/src/py/agent/gateway-connection/schema.json +26 -0
- package/src/py/dynamodb/agent-connection/schema.json +22 -0
- package/src/py/dynamodb/fast-api-connection/schema.json +18 -0
- package/src/py/dynamodb/mcp-server-connection/schema.json +22 -0
- package/src/py/dynamodb/schema.json +70 -0
- package/src/ts/agent/gateway-connection/schema.json +26 -0
- package/src/ts/dynamodb/agent-connection/schema.json +22 -0
- package/src/ts/dynamodb/mcp-server-connection/schema.json +22 -0
- package/src/ts/dynamodb/schema.json +70 -0
- package/src/ts/dynamodb/smithy-connection/schema.json +18 -0
- package/src/ts/dynamodb/trpc-connection/schema.json +18 -0
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Lambda DynamoDB Access
|
|
3
|
+
---
|
|
4
|
+
import Infrastructure from '@components/infrastructure.astro';
|
|
5
|
+
|
|
6
|
+
To allow Lambda functions to access the DynamoDB table, grant the necessary permissions in your infrastructure.
|
|
7
|
+
|
|
8
|
+
<Infrastructure>
|
|
9
|
+
<Fragment slot="cdk">
|
|
10
|
+
|
|
11
|
+
Call `grantReadWriteData` on the table construct. This grants both the DynamoDB and KMS permissions required by the Lambda execution role:
|
|
12
|
+
|
|
13
|
+
```ts title="packages/infra/src/stacks/application-stack.ts"
|
|
14
|
+
import { MyTable } from ':my-scope/common-constructs';
|
|
15
|
+
|
|
16
|
+
const table = new MyTable(this, 'Table');
|
|
17
|
+
|
|
18
|
+
const api = new Api(this, 'Api', {
|
|
19
|
+
integrations: Api.defaultIntegrations(this).build(),
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
Object.entries(api.integrations).forEach(([, integration]) => {
|
|
23
|
+
table.grantReadWriteData(integration.handler);
|
|
24
|
+
});
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
:::note
|
|
28
|
+
This example grants every handler in your API access. If only some handlers need access, configure them individually.
|
|
29
|
+
:::
|
|
30
|
+
</Fragment>
|
|
31
|
+
<Fragment slot="terraform">
|
|
32
|
+
|
|
33
|
+
Grant the Lambda execution role permission to access the DynamoDB table and its KMS encryption key:
|
|
34
|
+
|
|
35
|
+
```hcl title="packages/infra/src/main.tf"
|
|
36
|
+
module "my_table" {
|
|
37
|
+
source = "../../common/terraform/src/app/dynamodb/my-table"
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
resource "aws_iam_role_policy" "dynamodb_access" {
|
|
41
|
+
role = module.my_api.lambda_role_name
|
|
42
|
+
|
|
43
|
+
policy = jsonencode({
|
|
44
|
+
Version = "2012-10-17"
|
|
45
|
+
Statement = [
|
|
46
|
+
{
|
|
47
|
+
Effect = "Allow"
|
|
48
|
+
Action = [
|
|
49
|
+
"dynamodb:GetItem",
|
|
50
|
+
"dynamodb:PutItem",
|
|
51
|
+
"dynamodb:UpdateItem",
|
|
52
|
+
"dynamodb:DeleteItem",
|
|
53
|
+
"dynamodb:Query",
|
|
54
|
+
"dynamodb:Scan",
|
|
55
|
+
"dynamodb:BatchGetItem",
|
|
56
|
+
"dynamodb:BatchWriteItem",
|
|
57
|
+
]
|
|
58
|
+
Resource = [
|
|
59
|
+
module.my_table.table_arn,
|
|
60
|
+
"${module.my_table.table_arn}/index/*",
|
|
61
|
+
]
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
Effect = "Allow"
|
|
65
|
+
Action = [
|
|
66
|
+
"kms:Encrypt",
|
|
67
|
+
"kms:Decrypt",
|
|
68
|
+
"kms:ReEncrypt*",
|
|
69
|
+
"kms:GenerateDataKey*",
|
|
70
|
+
"kms:DescribeKey"
|
|
71
|
+
]
|
|
72
|
+
Resource = [module.my_table.kms_key_arn]
|
|
73
|
+
},
|
|
74
|
+
]
|
|
75
|
+
})
|
|
76
|
+
}
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
</Fragment>
|
|
80
|
+
</Infrastructure>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Python DynamoDB Local Development
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
The `connection` generator configures your project's `serve-local` target to depend on the DynamoDB project's `serve-local` target. DynamoDB Local will start automatically alongside your project when running `serve-local`.
|
|
6
|
+
|
|
7
|
+
The `SERVE_LOCAL=true` environment variable is set automatically, so `is_local()` returns `True` and your PynamoDB entities connect to the local DynamoDB instance instead of AWS.
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Deploying your DynamoDB Table
|
|
3
|
+
---
|
|
4
|
+
import Infrastructure from '@components/infrastructure.astro';
|
|
5
|
+
import Snippet from '@components/snippet.astro';
|
|
6
|
+
|
|
7
|
+
The DynamoDB generator creates CDK or Terraform infrastructure based on your selected `iac`.
|
|
8
|
+
|
|
9
|
+
<Infrastructure>
|
|
10
|
+
<Fragment slot="cdk">
|
|
11
|
+
The CDK construct is created in `common/constructs`. Example usage:
|
|
12
|
+
|
|
13
|
+
```ts title="packages/infra/src/stacks/application-stack.ts"
|
|
14
|
+
import { MyTable } from ':my-scope/common-constructs';
|
|
15
|
+
|
|
16
|
+
export class ApplicationStack extends Stack {
|
|
17
|
+
constructor(scope: Construct, id: string, props?: StackProps) {
|
|
18
|
+
super(scope, id, props);
|
|
19
|
+
|
|
20
|
+
const table = new MyTable(this, 'Table');
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
This provisions a DynamoDB table with:
|
|
26
|
+
- `pk` (partition key) and `sk` (sort key), both `String` type
|
|
27
|
+
- Global Secondary Indexes as defined in `config.json`
|
|
28
|
+
- On-demand (`PAY_PER_REQUEST`) billing
|
|
29
|
+
- Customer-managed KMS encryption with automatic key rotation
|
|
30
|
+
- Point-in-time recovery enabled
|
|
31
|
+
- Deletion protection enabled
|
|
32
|
+
- Table name registered in Runtime Config under the `dynamodb` namespace in AWS AppConfig
|
|
33
|
+
</Fragment>
|
|
34
|
+
<Fragment slot="terraform">
|
|
35
|
+
The Terraform module is created in `common/terraform`. Example usage:
|
|
36
|
+
|
|
37
|
+
```hcl title="packages/infra/src/main.tf"
|
|
38
|
+
module "my_table" {
|
|
39
|
+
source = "../../common/terraform/src/app/dynamodb/my-table"
|
|
40
|
+
}
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
This provisions a DynamoDB table with:
|
|
44
|
+
- `pk` (partition key) and `sk` (sort key), both `String` type
|
|
45
|
+
- Global Secondary Indexes as defined in `config.json`
|
|
46
|
+
- On-demand (`PAY_PER_REQUEST`) billing
|
|
47
|
+
- Customer-managed KMS encryption with automatic key rotation
|
|
48
|
+
- Point-in-time recovery enabled
|
|
49
|
+
- Deletion protection enabled
|
|
50
|
+
- Table name registered in Runtime Config
|
|
51
|
+
</Fragment>
|
|
52
|
+
</Infrastructure>
|
|
53
|
+
|
|
54
|
+
### Granting Access
|
|
55
|
+
|
|
56
|
+
<Snippet name="connection/lambda-dynamodb-access" />
|
|
57
|
+
|
|
58
|
+
### Deletion Protection
|
|
59
|
+
|
|
60
|
+
Deletion protection is enabled by default to prevent accidental table deletion.
|
|
61
|
+
|
|
62
|
+
#### Disable Deletion Protection
|
|
63
|
+
|
|
64
|
+
Disable it for environments where table deletion is expected, such as short-lived development or preview stacks.
|
|
65
|
+
|
|
66
|
+
<Infrastructure>
|
|
67
|
+
<Fragment slot="cdk">
|
|
68
|
+
|
|
69
|
+
```ts title="packages/infra/src/stacks/application-stack.ts"
|
|
70
|
+
import { MyTable } from ':my-scope/common-constructs';
|
|
71
|
+
|
|
72
|
+
const table = new MyTable(this, 'Table', {
|
|
73
|
+
deletionProtection: false,
|
|
74
|
+
});
|
|
75
|
+
```
|
|
76
|
+
</Fragment>
|
|
77
|
+
<Fragment slot="terraform">
|
|
78
|
+
|
|
79
|
+
```hcl title="packages/infra/src/main.tf"
|
|
80
|
+
module "my_table" {
|
|
81
|
+
source = "../../common/terraform/src/app/dynamodb/my-table"
|
|
82
|
+
deletion_protection_enabled = false
|
|
83
|
+
}
|
|
84
|
+
```
|
|
85
|
+
</Fragment>
|
|
86
|
+
</Infrastructure>
|
|
87
|
+
|
|
88
|
+
### Billing Mode
|
|
89
|
+
|
|
90
|
+
The table defaults to on-demand (`PAY_PER_REQUEST`) billing. Switch to provisioned capacity for predictable, high-throughput workloads.
|
|
91
|
+
|
|
92
|
+
<Infrastructure>
|
|
93
|
+
<Fragment slot="cdk">
|
|
94
|
+
|
|
95
|
+
```ts title="packages/infra/src/stacks/application-stack.ts"
|
|
96
|
+
import { BillingMode } from 'aws-cdk-lib/aws-dynamodb';
|
|
97
|
+
import { MyTable } from ':my-scope/common-constructs';
|
|
98
|
+
|
|
99
|
+
const table = new MyTable(this, 'Table', {
|
|
100
|
+
billingMode: BillingMode.PROVISIONED,
|
|
101
|
+
readCapacity: 5,
|
|
102
|
+
writeCapacity: 5,
|
|
103
|
+
});
|
|
104
|
+
```
|
|
105
|
+
</Fragment>
|
|
106
|
+
<Fragment slot="terraform">
|
|
107
|
+
|
|
108
|
+
```hcl title="packages/infra/src/main.tf"
|
|
109
|
+
module "my_table" {
|
|
110
|
+
source = "../../common/terraform/src/app/dynamodb/my-table"
|
|
111
|
+
billing_mode = "PROVISIONED"
|
|
112
|
+
}
|
|
113
|
+
```
|
|
114
|
+
</Fragment>
|
|
115
|
+
</Infrastructure>
|
|
116
|
+
|
|
117
|
+
### Point-in-time Recovery
|
|
118
|
+
|
|
119
|
+
[Point-in-time recovery](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Point-in-time-recovery.html) is enabled by default, allowing you to restore the table to any point in the last 35 days.
|
|
120
|
+
|
|
121
|
+
#### Disable Point-in-time Recovery
|
|
122
|
+
|
|
123
|
+
<Infrastructure>
|
|
124
|
+
<Fragment slot="cdk">
|
|
125
|
+
|
|
126
|
+
```ts title="packages/infra/src/stacks/application-stack.ts"
|
|
127
|
+
import { MyTable } from ':my-scope/common-constructs';
|
|
128
|
+
|
|
129
|
+
const table = new MyTable(this, 'Table', {
|
|
130
|
+
pointInTimeRecoverySpecification: { pointInTimeRecoveryEnabled: false },
|
|
131
|
+
});
|
|
132
|
+
```
|
|
133
|
+
</Fragment>
|
|
134
|
+
<Fragment slot="terraform">
|
|
135
|
+
|
|
136
|
+
```hcl title="packages/infra/src/main.tf"
|
|
137
|
+
module "my_table" {
|
|
138
|
+
source = "../../common/terraform/src/app/dynamodb/my-table"
|
|
139
|
+
point_in_time_recovery_enabled = false
|
|
140
|
+
}
|
|
141
|
+
```
|
|
142
|
+
</Fragment>
|
|
143
|
+
</Infrastructure>
|
|
144
|
+
|
|
145
|
+
### Encryption Key Rotation
|
|
146
|
+
|
|
147
|
+
The KMS key used to encrypt the table has automatic key rotation enabled by default. Disable it if your security policy manages rotation externally.
|
|
148
|
+
|
|
149
|
+
#### Disable Encryption Key Rotation
|
|
150
|
+
|
|
151
|
+
<Infrastructure>
|
|
152
|
+
<Fragment slot="cdk">
|
|
153
|
+
|
|
154
|
+
```ts title="packages/infra/src/stacks/application-stack.ts"
|
|
155
|
+
import { MyTable } from ':my-scope/common-constructs';
|
|
156
|
+
|
|
157
|
+
const table = new MyTable(this, 'Table', {
|
|
158
|
+
enableKeyRotation: false,
|
|
159
|
+
});
|
|
160
|
+
```
|
|
161
|
+
</Fragment>
|
|
162
|
+
<Fragment slot="terraform">
|
|
163
|
+
|
|
164
|
+
```hcl title="packages/infra/src/main.tf"
|
|
165
|
+
module "my_table" {
|
|
166
|
+
source = "../../common/terraform/src/app/dynamodb/my-table"
|
|
167
|
+
enable_key_rotation = false
|
|
168
|
+
}
|
|
169
|
+
```
|
|
170
|
+
</Fragment>
|
|
171
|
+
</Infrastructure>
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: GSI Configuration
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
```json title="config.json"
|
|
6
|
+
{
|
|
7
|
+
...
|
|
8
|
+
"tableConfig": {
|
|
9
|
+
"globalSecondaryIndexes": [
|
|
10
|
+
{
|
|
11
|
+
"indexName": "gsi1pk-gsi1sk-index",
|
|
12
|
+
"partitionKey": "gsi1pk",
|
|
13
|
+
"sortKey": "gsi1sk"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"indexName": "gsi2pk-gsi2sk-index",
|
|
17
|
+
"partitionKey": "gsi2pk",
|
|
18
|
+
"sortKey": "gsi2sk"
|
|
19
|
+
}
|
|
20
|
+
]
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
The `sortKey` field is optional for hash-key-only GSIs.
|
|
26
|
+
|
|
27
|
+
This config file is the single source of truth read by all consumers:
|
|
28
|
+
- **Local development** — `serve-local` reads `config.json` and creates or updates the local table to match the GSI list
|
|
29
|
+
- **CDK** — the construct reads `config.json` at synth time, so GSI changes are reflected on the next `cdk deploy`
|
|
30
|
+
- **Terraform** — the module reads `config.json` at plan/apply time
|
|
31
|
+
|
|
32
|
+
### One GSI per Deployment
|
|
33
|
+
|
|
34
|
+
:::caution
|
|
35
|
+
DynamoDB [does not allow more than one GSI to be created or deleted in a single table update](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/GSI.OnlineOps.html).
|
|
36
|
+
|
|
37
|
+
Each deployment can add or remove **at most one GSI**. If you need to add or remove multiple GSIs, do so one at a time — update `config.json` and relevant entity classes, deploy the stack, then repeat for the next change.
|
|
38
|
+
:::
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: DynamoDB Infrastructure
|
|
3
|
+
---
|
|
4
|
+
import { FileTree } from '@astrojs/starlight/components';
|
|
5
|
+
import Infrastructure from '@components/infrastructure.astro';
|
|
6
|
+
import Snippet from '@components/snippet.astro';
|
|
7
|
+
|
|
8
|
+
<Snippet name="shared-constructs" />
|
|
9
|
+
|
|
10
|
+
<Infrastructure>
|
|
11
|
+
<Fragment slot="cdk">
|
|
12
|
+
<FileTree>
|
|
13
|
+
- packages/common/constructs/src
|
|
14
|
+
- app
|
|
15
|
+
- dynamodb
|
|
16
|
+
- \<name>.ts Infrastructure specific to your table
|
|
17
|
+
- core
|
|
18
|
+
- dynamodb.ts Generic DynamoDB table construct
|
|
19
|
+
</FileTree>
|
|
20
|
+
</Fragment>
|
|
21
|
+
<Fragment slot="terraform">
|
|
22
|
+
<FileTree>
|
|
23
|
+
- packages/common/terraform/src
|
|
24
|
+
- app
|
|
25
|
+
- dynamodb
|
|
26
|
+
- \<name>
|
|
27
|
+
- \<name>.tf Module specific to your table
|
|
28
|
+
- core
|
|
29
|
+
- dynamodb
|
|
30
|
+
- dynamodb.tf Generic DynamoDB module
|
|
31
|
+
</FileTree>
|
|
32
|
+
</Fragment>
|
|
33
|
+
</Infrastructure>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Starting Local DynamoDB
|
|
3
|
+
---
|
|
4
|
+
import NxCommands from '@components/nx-commands.astro';
|
|
5
|
+
|
|
6
|
+
The generator configures a `serve-local` target that starts a [DynamoDB Local](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DynamoDBLocal.html) instance and creates the table:
|
|
7
|
+
|
|
8
|
+
<NxCommands commands={['run <project-name>:serve-local']} />
|
|
9
|
+
|
|
10
|
+
This automatically:
|
|
11
|
+
1. Pulls the DynamoDB Local image (`pull-image` target)
|
|
12
|
+
2. Starts a container
|
|
13
|
+
3. Creates a local table with the indexes defined in `config.json`
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Serve Local Windows Caution
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Stopping `serve-local` (e.g. with `Ctrl+C`) automatically removes the DynamoDB Local container, but preserves the named volume so your data persists across restarts.
|
|
6
|
+
|
|
7
|
+
:::caution[Windows]
|
|
8
|
+
Due to limitations with signal handling on Windows, the container is not automatically removed when `serve-local` is stopped. You will need to remove it manually:
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
<engine> rm -f <scope>-dynamodb
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Replace `<engine>` with your container engine (`docker` or `finch`) and `<scope>` with your Nx workspace scope (e.g. `proj`).
|
|
15
|
+
:::
|
|
@@ -4,7 +4,7 @@ title: Required Prerequisites
|
|
|
4
4
|
- [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git)
|
|
5
5
|
- [Node >= 22](https://nodejs.org/en/download) (We recommend using something like [NVM](https://github.com/nvm-sh/nvm) to manage your node versions)
|
|
6
6
|
- verify by running `node --version`
|
|
7
|
-
- [PNPM >=
|
|
7
|
+
- [PNPM >= 11](https://pnpm.io/installation#using-npm) (you can also use [Yarn >= 4](https://yarnpkg.com/getting-started/install), [Bun >= 1](https://bun.sh/docs/installation), or [NPM >= 10](https://nodejs.org/en/learn/getting-started/an-introduction-to-the-npm-package-manager) if you prefer)
|
|
8
8
|
- verify by running `pnpm --version`, `yarn --version`, `bun --version` or `npm --version`
|
|
9
9
|
- [UV >= 0.5.29](https://docs.astral.sh/uv/getting-started/installation/)
|
|
10
10
|
1. install Python 3.14 by running: `uv python install 3.14.0`
|
package/generators.json
CHANGED
|
@@ -3,6 +3,26 @@
|
|
|
3
3
|
"name": "@aws/nx-plugin",
|
|
4
4
|
"version": "0.0.1",
|
|
5
5
|
"generators": {
|
|
6
|
+
"agentcore-gateway": {
|
|
7
|
+
"factory": "./src/agentcore-gateway/generator",
|
|
8
|
+
"schema": "./src/agentcore-gateway/schema.json",
|
|
9
|
+
"description": "Generate an AgentCore Gateway project",
|
|
10
|
+
"metric": "g48"
|
|
11
|
+
},
|
|
12
|
+
"agentcore-gateway#mcp-connection": {
|
|
13
|
+
"factory": "./src/agentcore-gateway/mcp-connection/generator",
|
|
14
|
+
"schema": "./src/agentcore-gateway/mcp-connection/schema.json",
|
|
15
|
+
"description": "Connect an AgentCore Gateway to an MCP server",
|
|
16
|
+
"metric": "g49",
|
|
17
|
+
"hidden": true
|
|
18
|
+
},
|
|
19
|
+
"agentcore-gateway#gateway-connection": {
|
|
20
|
+
"factory": "./src/agentcore-gateway/gateway-connection/generator",
|
|
21
|
+
"schema": "./src/agentcore-gateway/gateway-connection/schema.json",
|
|
22
|
+
"description": "Connect an AgentCore Gateway to another AgentCore Gateway",
|
|
23
|
+
"metric": "g52",
|
|
24
|
+
"hidden": true
|
|
25
|
+
},
|
|
6
26
|
"connection": {
|
|
7
27
|
"factory": "./src/connection/generator",
|
|
8
28
|
"schema": "./src/connection/schema.json",
|
|
@@ -23,7 +43,11 @@
|
|
|
23
43
|
"connection/trpc-rdb",
|
|
24
44
|
"connection/smithy-rdb",
|
|
25
45
|
"connection/ts-mcp-server-rdb",
|
|
26
|
-
"connection/ts-agent-rdb"
|
|
46
|
+
"connection/ts-agent-rdb",
|
|
47
|
+
"connection/ts-agent-gateway",
|
|
48
|
+
"connection/py-agent-gateway",
|
|
49
|
+
"connection/agentcore-gateway-mcp",
|
|
50
|
+
"connection/agentcore-gateway-gateway"
|
|
27
51
|
]
|
|
28
52
|
},
|
|
29
53
|
"license": {
|
|
@@ -279,6 +303,13 @@
|
|
|
279
303
|
"metric": "g35",
|
|
280
304
|
"hidden": true
|
|
281
305
|
},
|
|
306
|
+
"ts#agent#gateway-connection": {
|
|
307
|
+
"factory": "./src/ts/agent/gateway-connection/generator",
|
|
308
|
+
"schema": "./src/ts/agent/gateway-connection/schema.json",
|
|
309
|
+
"description": "Connect a TypeScript Agent to an AgentCore Gateway",
|
|
310
|
+
"metric": "g50",
|
|
311
|
+
"hidden": true
|
|
312
|
+
},
|
|
282
313
|
"py#agent#a2a-connection": {
|
|
283
314
|
"factory": "./src/py/agent/a2a-connection/generator",
|
|
284
315
|
"schema": "./src/py/agent/a2a-connection/schema.json",
|
|
@@ -286,6 +317,13 @@
|
|
|
286
317
|
"metric": "g36",
|
|
287
318
|
"hidden": true
|
|
288
319
|
},
|
|
320
|
+
"py#agent#gateway-connection": {
|
|
321
|
+
"factory": "./src/py/agent/gateway-connection/generator",
|
|
322
|
+
"schema": "./src/py/agent/gateway-connection/schema.json",
|
|
323
|
+
"description": "Connect a Python Agent to an AgentCore Gateway",
|
|
324
|
+
"metric": "g51",
|
|
325
|
+
"hidden": true
|
|
326
|
+
},
|
|
289
327
|
"ts#sync": {
|
|
290
328
|
"factory": "./src/ts/sync/generator",
|
|
291
329
|
"schema": "./src/ts/sync/schema.json",
|
|
@@ -349,6 +387,67 @@
|
|
|
349
387
|
"description": "Connect a ts#mcp-server to a ts#rdb project",
|
|
350
388
|
"metric": "g42",
|
|
351
389
|
"hidden": true
|
|
390
|
+
},
|
|
391
|
+
"ts#dynamodb": {
|
|
392
|
+
"factory": "./src/ts/dynamodb/generator",
|
|
393
|
+
"schema": "./src/ts/dynamodb/schema.json",
|
|
394
|
+
"description": "Create a TypeScript DynamoDB project",
|
|
395
|
+
"metric": "g43"
|
|
396
|
+
},
|
|
397
|
+
"ts#dynamodb#trpc-connection": {
|
|
398
|
+
"factory": "./src/ts/dynamodb/trpc-connection/generator",
|
|
399
|
+
"schema": "./src/ts/dynamodb/trpc-connection/schema.json",
|
|
400
|
+
"description": "Connect a ts#trpc-api project to a ts#dynamodb project",
|
|
401
|
+
"metric": "g44",
|
|
402
|
+
"hidden": true
|
|
403
|
+
},
|
|
404
|
+
"ts#dynamodb#smithy-connection": {
|
|
405
|
+
"factory": "./src/ts/dynamodb/smithy-connection/generator",
|
|
406
|
+
"schema": "./src/ts/dynamodb/smithy-connection/schema.json",
|
|
407
|
+
"description": "Connect a Smithy backend to a ts#dynamodb project",
|
|
408
|
+
"metric": "g45",
|
|
409
|
+
"hidden": true
|
|
410
|
+
},
|
|
411
|
+
"ts#dynamodb#agent-connection": {
|
|
412
|
+
"factory": "./src/ts/dynamodb/agent-connection/generator",
|
|
413
|
+
"schema": "./src/ts/dynamodb/agent-connection/schema.json",
|
|
414
|
+
"description": "Connect a ts#agent to a ts#dynamodb project",
|
|
415
|
+
"metric": "g46",
|
|
416
|
+
"hidden": true
|
|
417
|
+
},
|
|
418
|
+
"ts#dynamodb#mcp-server-connection": {
|
|
419
|
+
"factory": "./src/ts/dynamodb/mcp-server-connection/generator",
|
|
420
|
+
"schema": "./src/ts/dynamodb/mcp-server-connection/schema.json",
|
|
421
|
+
"description": "Connect a ts#mcp-server to a ts#dynamodb project",
|
|
422
|
+
"metric": "g47",
|
|
423
|
+
"hidden": true
|
|
424
|
+
},
|
|
425
|
+
"py#dynamodb": {
|
|
426
|
+
"factory": "./src/py/dynamodb/generator",
|
|
427
|
+
"schema": "./src/py/dynamodb/schema.json",
|
|
428
|
+
"description": "Create a Python DynamoDB project",
|
|
429
|
+
"metric": "g52"
|
|
430
|
+
},
|
|
431
|
+
"py#dynamodb#fast-api-connection": {
|
|
432
|
+
"factory": "./src/py/dynamodb/fast-api-connection/generator",
|
|
433
|
+
"schema": "./src/py/dynamodb/fast-api-connection/schema.json",
|
|
434
|
+
"description": "Connect a py#fast-api project to a py#dynamodb project",
|
|
435
|
+
"metric": "g53",
|
|
436
|
+
"hidden": true
|
|
437
|
+
},
|
|
438
|
+
"py#dynamodb#agent-connection": {
|
|
439
|
+
"factory": "./src/py/dynamodb/agent-connection/generator",
|
|
440
|
+
"schema": "./src/py/dynamodb/agent-connection/schema.json",
|
|
441
|
+
"description": "Connect a py#agent to a py#dynamodb project",
|
|
442
|
+
"metric": "g54",
|
|
443
|
+
"hidden": true
|
|
444
|
+
},
|
|
445
|
+
"py#dynamodb#mcp-server-connection": {
|
|
446
|
+
"factory": "./src/py/dynamodb/mcp-server-connection/generator",
|
|
447
|
+
"schema": "./src/py/dynamodb/mcp-server-connection/schema.json",
|
|
448
|
+
"description": "Connect a py#mcp-server to a py#dynamodb project",
|
|
449
|
+
"metric": "g55",
|
|
450
|
+
"hidden": true
|
|
352
451
|
}
|
|
353
452
|
}
|
|
354
453
|
}
|
package/package.json
CHANGED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/schema",
|
|
3
|
+
"$id": "agentcore-gateway#gateway-connection",
|
|
4
|
+
"title": "agentcore-gateway#gateway-connection",
|
|
5
|
+
"description": "Connect an AgentCore Gateway to another AgentCore Gateway",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"sourceProject": {
|
|
9
|
+
"type": "string",
|
|
10
|
+
"description": "The gateway project to add the target gateway to"
|
|
11
|
+
},
|
|
12
|
+
"targetProject": {
|
|
13
|
+
"type": "string",
|
|
14
|
+
"description": "The gateway project to register as a target"
|
|
15
|
+
},
|
|
16
|
+
"sourceComponent": {
|
|
17
|
+
"type": "string",
|
|
18
|
+
"description": "The gateway component in the source project"
|
|
19
|
+
},
|
|
20
|
+
"targetComponent": {
|
|
21
|
+
"type": "string",
|
|
22
|
+
"description": "The gateway component in the target project"
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"required": ["sourceProject", "targetProject"]
|
|
26
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/schema",
|
|
3
|
+
"$id": "agentcore-gateway#mcp-connection",
|
|
4
|
+
"title": "agentcore-gateway#mcp-connection",
|
|
5
|
+
"description": "Connect an AgentCore Gateway to an MCP server",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"sourceProject": {
|
|
9
|
+
"type": "string",
|
|
10
|
+
"description": "The gateway project"
|
|
11
|
+
},
|
|
12
|
+
"targetProject": {
|
|
13
|
+
"type": "string",
|
|
14
|
+
"description": "The MCP server project"
|
|
15
|
+
},
|
|
16
|
+
"sourceComponent": {
|
|
17
|
+
"type": "string",
|
|
18
|
+
"description": "The gateway component in the source project"
|
|
19
|
+
},
|
|
20
|
+
"targetComponent": {
|
|
21
|
+
"type": "string",
|
|
22
|
+
"description": "The MCP server component in the target project"
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"required": ["sourceProject", "targetProject"]
|
|
26
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/schema",
|
|
3
|
+
"$id": "agentcore-gateway",
|
|
4
|
+
"title": "agentcore-gateway",
|
|
5
|
+
"description": "Generate an AgentCore Gateway project",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"name": {
|
|
9
|
+
"type": "string",
|
|
10
|
+
"description": "The name of your AgentCore Gateway project",
|
|
11
|
+
"$default": {
|
|
12
|
+
"$source": "argv",
|
|
13
|
+
"index": 0
|
|
14
|
+
},
|
|
15
|
+
"x-prompt": "What would you like to call your AgentCore Gateway?",
|
|
16
|
+
"x-priority": "important"
|
|
17
|
+
},
|
|
18
|
+
"directory": {
|
|
19
|
+
"type": "string",
|
|
20
|
+
"description": "Parent directory where the gateway project is placed.",
|
|
21
|
+
"default": "packages"
|
|
22
|
+
},
|
|
23
|
+
"subDirectory": {
|
|
24
|
+
"type": "string",
|
|
25
|
+
"description": "The sub directory the project is placed in. By default this is the project name."
|
|
26
|
+
},
|
|
27
|
+
"protocol": {
|
|
28
|
+
"type": "string",
|
|
29
|
+
"description": "The inbound protocol exposed by your gateway. Only mcp is supported today; additional protocols may be added in future.",
|
|
30
|
+
"enum": ["mcp"],
|
|
31
|
+
"default": "mcp",
|
|
32
|
+
"x-priority": "important"
|
|
33
|
+
},
|
|
34
|
+
"auth": {
|
|
35
|
+
"type": "string",
|
|
36
|
+
"description": "The method used to authenticate inbound requests to your gateway. Only iam is supported today; cognito and custom-jwt may be added in future.",
|
|
37
|
+
"enum": ["iam"],
|
|
38
|
+
"default": "iam",
|
|
39
|
+
"x-priority": "important"
|
|
40
|
+
},
|
|
41
|
+
"cedarPolicy": {
|
|
42
|
+
"type": "boolean",
|
|
43
|
+
"description": "Whether to include a Cedar policy engine enforcing fine-grained authorization on the gateway.",
|
|
44
|
+
"default": true,
|
|
45
|
+
"x-priority": "important"
|
|
46
|
+
},
|
|
47
|
+
"infra": {
|
|
48
|
+
"type": "string",
|
|
49
|
+
"description": "The type of infrastructure to host your gateway. Select none for no hosting.",
|
|
50
|
+
"x-prompt": "How would you like to host your gateway?",
|
|
51
|
+
"enum": ["agentcore", "none"],
|
|
52
|
+
"default": "agentcore",
|
|
53
|
+
"x-priority": "important"
|
|
54
|
+
},
|
|
55
|
+
"iac": {
|
|
56
|
+
"type": "string",
|
|
57
|
+
"description": "The preferred IaC provider. By default this is inherited from your initial selection.",
|
|
58
|
+
"enum": ["inherit", "cdk", "terraform"],
|
|
59
|
+
"x-priority": "important",
|
|
60
|
+
"default": "inherit",
|
|
61
|
+
"x-prompt": "Which provider would you like to manage your infrastructure? (default: inherit)"
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
"required": ["name"]
|
|
65
|
+
}
|
package/src/license/schema.json
CHANGED
|
@@ -17,6 +17,12 @@
|
|
|
17
17
|
"description": "The copyright holder, included in the LICENSE file and source file headers by default.",
|
|
18
18
|
"default": "Amazon.com, Inc. or its affiliates",
|
|
19
19
|
"x-priority": "important"
|
|
20
|
+
},
|
|
21
|
+
"dependencyCheck": {
|
|
22
|
+
"type": "boolean",
|
|
23
|
+
"description": "Configure a license-check target that fails when dependencies declare licenses outside the configured allowlist.",
|
|
24
|
+
"default": true,
|
|
25
|
+
"x-priority": "important"
|
|
20
26
|
}
|
|
21
27
|
},
|
|
22
28
|
"required": []
|
package/src/preset/schema.json
CHANGED
|
@@ -23,6 +23,11 @@
|
|
|
23
23
|
"description": "Whether to configure git-secrets to prevent committing AWS credentials.",
|
|
24
24
|
"default": true
|
|
25
25
|
},
|
|
26
|
+
"mcp": {
|
|
27
|
+
"type": "boolean",
|
|
28
|
+
"description": "Whether to configure the Nx Plugin for AWS MCP server for use by coding agents.",
|
|
29
|
+
"default": true
|
|
30
|
+
},
|
|
26
31
|
"containers": {
|
|
27
32
|
"type": "string",
|
|
28
33
|
"description": "The container engine to use for build/push/login. 'infer' picks docker if installed, otherwise finch (falling back to docker when neither is installed).",
|