@jaypie/mcp 0.8.155 → 0.8.157

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.
@@ -13,7 +13,7 @@ import { RELEASE_NOTES_HELP } from './help.js';
13
13
  /**
14
14
  * Docs Suite - Documentation services (skill, version, release_notes)
15
15
  */
16
- const BUILD_VERSION_STRING = "@jaypie/mcp@0.8.155#dee71f8c"
16
+ const BUILD_VERSION_STRING = "@jaypie/mcp@0.8.157#937cc1b9"
17
17
  ;
18
18
  // =============================================================================
19
19
  // ASSET PATHS
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jaypie/mcp",
3
- "version": "0.8.155",
3
+ "version": "0.8.157",
4
4
  "description": "Jaypie MCP",
5
5
  "repository": {
6
6
  "type": "git",
@@ -0,0 +1,19 @@
1
+ ---
2
+ version: 1.2.84
3
+ date: 2026-09-13
4
+ summary: JaypieLambda and JaypieMigration grant Query and Scan on table indexes CDK does not declare
5
+ ---
6
+
7
+ ## Changes
8
+
9
+ - **`JaypieLambda` `tables`** grants `dynamodb:Query` and `dynamodb:Scan` on
10
+ `${tableArn}/index/*` for every table. CDK adds index ARNs only for indexes
11
+ declared in CDK, so a Lambda could not query a GSI created by a migration or
12
+ owned by an imported table (#546).
13
+ - **`JaypieMigration`** inherits the grant, so a migration can query an index an
14
+ earlier migration created in the same deploy.
15
+
16
+ ## Upgrade
17
+
18
+ Remove workarounds that add `dynamodb:Query` or `dynamodb:Scan` on
19
+ `${tableArn}/index/*` to a `JaypieLambda` or `JaypieMigration` role.
@@ -0,0 +1,22 @@
1
+ ---
2
+ version: 1.2.85
3
+ date: 2026-09-13
4
+ summary: Per-build tags skip DynamoDB tables so migration-owned indexes survive redeploys
5
+ ---
6
+
7
+ ## Changes
8
+
9
+ - **`constructTagger`** adds `buildDate`, `buildHex`, `buildTime`, `commit`, and
10
+ `version` with `excludeResourceTypes` for `AWS::DynamoDB::GlobalTable` and
11
+ `AWS::DynamoDB::Table`. These tags changed every synth, forcing a table update
12
+ on every deploy. A table whose GSIs a migration created rejects that update
13
+ with `Invalid AttributeDefinitions`, so every deploy after the first rolled
14
+ back (#548).
15
+ - **`JaypieInfrastructureStack`** applies the same exclusion to `stackSha`.
16
+
17
+ ## Upgrade
18
+
19
+ Tables deployed with earlier versions carry the build tags. The first deploy on
20
+ this version removes them, which is a table update. A table with no
21
+ migration-owned indexes updates normally. A table with migration-owned indexes
22
+ fails that update: recreate the table or declare its indexes in CDK.
@@ -0,0 +1,11 @@
1
+ ---
2
+ version: 0.8.156
3
+ date: 2026-09-13
4
+ summary: Skills document index Query and Scan grants for tables passed to JaypieLambda and JaypieMigration
5
+ ---
6
+
7
+ ## Changes
8
+
9
+ - **`cdk`, `dynamodb`, and `migrations` skills** document that tables passed
10
+ via `tables` get `Query` and `Scan` on `${tableArn}/index/*`, covering
11
+ indexes created by migrations that CDK never declares (#546).
@@ -0,0 +1,13 @@
1
+ ---
2
+ version: 0.8.157
3
+ date: 2026-09-13
4
+ summary: Document that tables with migration-owned indexes need stable CloudFormation properties
5
+ ---
6
+
7
+ ## Changes
8
+
9
+ - **`dynamodb`** adds "Keep Table Properties Stable": any CloudFormation update
10
+ to a table fails once a migration creates a GSI.
11
+ - **`migrations`** notes migration-owned index behavior and recovery for stacks
12
+ deployed before `@jaypie/constructs` 1.2.85.
13
+ - **`cdk`** notes that per-build tags skip DynamoDB tables (#548).
package/skills/cdk.md CHANGED
@@ -131,7 +131,7 @@ workspaces/
131
131
  `cdk-{PROJECT_SPONSOR}-{PROJECT_KEY}-{PROJECT_ENV}-{PROJECT_NONCE}[-{key}]`,
132
132
  so naming stays consistent across sandbox, personal, and production deploys.
133
133
  2. **Account & region** resolved from `CDK_DEFAULT_ACCOUNT` / `CDK_DEFAULT_REGION` (overridable via `env`).
134
- 3. **Standard tags** applied to the stack and propagated to every taggable child resource: `env`, `project`, `sponsor`, `nonce`, `commit`, `buildHex`, `buildDate`, `buildTime`, `version`, `service`, `creation`, `role`, `stack`.
134
+ 3. **Standard tags** applied to the stack and propagated to every taggable child resource: `env`, `project`, `sponsor`, `nonce`, `commit`, `buildHex`, `buildDate`, `buildTime`, `version`, `service`, `creation`, `role`, `stack`. Per-build tags (`buildDate`, `buildHex`, `buildTime`, `commit`, `version`, and `JaypieInfrastructureStack`'s `stackSha`) skip `AWS::DynamoDB::GlobalTable` and `AWS::DynamoDB::Table` so tables stay unchanged across deploys (see `skill("migrations")`).
135
135
 
136
136
  ```typescript
137
137
  import { Construct } from "constructs";
@@ -232,8 +232,10 @@ const handler = new JaypieLambda(this, "ApiHandler", {
232
232
 
233
233
  | Tables Count | Permissions | Environment |
234
234
  |-------------|-------------|-------------|
235
- | 1 table | `grantReadWriteData()` | `DYNAMODB_TABLE_NAME` set automatically |
236
- | 2+ tables | `grantReadWriteData()` for each | No auto env var — set `CDK_ENV_TABLE` manually |
235
+ | 1 table | `grantReadWriteData()` plus `Query`/`Scan` on `index/*` | `DYNAMODB_TABLE_NAME` set automatically |
236
+ | 2+ tables | `grantReadWriteData()` plus `Query`/`Scan` on `index/*` for each | No auto env var — set `CDK_ENV_TABLE` manually |
237
+
238
+ CDK grants index ARNs only for indexes declared in CDK. The explicit `index/*` grant covers GSIs created by migrations (`UpdateTable`) and indexes on imported tables.
237
239
 
238
240
  Single table example — at runtime, use `process.env.DYNAMODB_TABLE_NAME`:
239
241
 
@@ -272,6 +272,8 @@ GSIs are defined using `fabricIndex()` from `@jaypie/fabric`. **Do not create al
272
272
 
273
273
  **Important:** DynamoDB allows only **one GSI to be added per deployment**. If you need multiple GSIs, add them sequentially across separate deploys. For production tables, the AWS CLI is often better suited for adding GSIs than CDK (which may try to replace the table).
274
274
 
275
+ **Grants:** CDK adds `${tableArn}/index/*` to grants only for indexes declared in CDK. GSIs created by migrations or the CLI are invisible to CDK, so a role needs `Query` and `Scan` on the index ARN explicitly. `JaypieLambda` and `JaypieMigration` grant this for every table in `tables`; hand-rolled roles must add it.
276
+
275
277
  All GSIs use a composite sort key of `scope#updatedAt` (stored as `{indexName}Sk`). Queries use `begins_with` on the sk to filter by scope; omitting scope lists across all scopes.
276
278
 
277
279
  | GSI Name | Partition Key Pattern | Sort Key | Purpose | Add When |
@@ -472,6 +474,16 @@ const table = new JaypieDynamoDb(this, "myApp", {
472
474
 
473
475
  Wire tables to Lambda using the `tables` prop — see `skill("cdk")` for details.
474
476
 
477
+ ### Keep Table Properties Stable
478
+
479
+ Once a migration creates a GSI through `UpdateTable`, every CloudFormation update to the table fails:
480
+
481
+ ```
482
+ Invalid AttributeDefinitions Expected the following attributes to be present: [indexModel, ...]
483
+ ```
484
+
485
+ CloudFormation sends only the key attributes the template declares, and DynamoDB rejects a request that omits attributes existing indexes reference. Table properties, tags included, must stay the same across deploys. Jaypie keeps per-build tags (`buildDate`, `buildHex`, `buildTime`, `commit`, `version`, `stackSha`) off `AWS::DynamoDB::GlobalTable` and `AWS::DynamoDB::Table` for this reason. Change a migration-owned table through migrations, or declare its indexes in CDK.
486
+
475
487
  ## Local Development
476
488
 
477
489
  Use docker-compose for local DynamoDB. The `@jaypie/dynamodb` MCP tool can generate a `docker-compose.yml` with custom ports.
@@ -47,7 +47,8 @@ new JaypieMigration(this, "SeedData", {
47
47
  - **Role**: Tagged as `CDK.ROLE.PROCESSING`
48
48
  - **Execution**: Uses `cr.Provider` with both `onEventHandler` and `isCompleteHandler` pointing to the same Lambda. The `onEventHandler` returns `PhysicalResourceId` immediately; the migration code runs in `isCompleteHandler` invocations, which are polled by Step Functions until `IsComplete: true`. `Delete` requests skip the migration entirely.
49
49
  - **Dependencies**: Use `dependencies` to ensure tables and other resources exist before the migration executes
50
- - **Permissions**: Tables passed via `tables` get data-plane (`grantReadWriteData`) plus control-plane access (`DescribeTable`, `UpdateTable`, `UpdateTimeToLive`, `UpdateContinuousBackups`) scoped to the table ARN and its indexes — migrations that add GSIs, toggle TTL, or change backups work without extra IAM
50
+ - **Permissions**: Tables passed via `tables` get data-plane (`grantReadWriteData`), `Query` and `Scan` on `${tableArn}/index/*`, plus control-plane access (`DescribeTable`, `UpdateTable`, `UpdateTimeToLive`, `UpdateContinuousBackups`) scoped to the table ARN and its indexes — migrations that add GSIs, toggle TTL, or change backups work without extra IAM, and later migrations can query the GSIs earlier ones created
51
+ - **Migration-owned indexes**: after a migration creates a GSI, any CloudFormation update to the table fails with `Invalid AttributeDefinitions`. Keep table props and tags stable across deploys; per-build tags already skip tables (see `skill("dynamodb")`). Stacks deployed before `@jaypie/constructs` 1.2.85 carry build tags on the table, and removing them is itself a failing table update: recover by recreating the table or declaring its indexes in CDK
51
52
 
52
53
  ## Migration Lambda Handler
53
54