@jaypie/mcp 0.8.167 → 0.8.168
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/dist/assets.js +3 -3
- package/package.json +1 -1
- package/release-notes/dynamodb/0.6.12.md +22 -0
- package/release-notes/testkit/1.2.77.md +11 -0
- package/skills/dynamodb.md +17 -5
package/dist/assets.js
CHANGED
|
@@ -55,11 +55,11 @@ function getMcpAssetPaths() {
|
|
|
55
55
|
*/
|
|
56
56
|
function getMcpBuildInfo() {
|
|
57
57
|
return {
|
|
58
|
-
commit: "
|
|
58
|
+
commit: "fa407a35"
|
|
59
59
|
,
|
|
60
|
-
version: "0.8.
|
|
60
|
+
version: "0.8.168"
|
|
61
61
|
,
|
|
62
|
-
versionString: "@jaypie/mcp@0.8.
|
|
62
|
+
versionString: "@jaypie/mcp@0.8.168#fa407a35"
|
|
63
63
|
,
|
|
64
64
|
};
|
|
65
65
|
}
|
package/package.json
CHANGED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
---
|
|
2
|
+
version: 0.6.12
|
|
3
|
+
date: 2026-09-23
|
|
4
|
+
summary: preserveTimestamps keeps original createdAt/updatedAt for imports, restores, and replays
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Changes
|
|
8
|
+
|
|
9
|
+
- **`preserveTimestamps` opt-in** (#580). `createEntity`, `updateEntity`, and
|
|
10
|
+
`transactWriteEntities` accept `preserveTimestamps: true`, and
|
|
11
|
+
`seedEntities` accepts it as an option. With the flag, the entity's own
|
|
12
|
+
`createdAt` and `updatedAt` are kept (each falls back to now when missing),
|
|
13
|
+
so `scope#updatedAt` sort keys reflect when the item happened. TTL handling,
|
|
14
|
+
date serialization, and conditional-write error mapping still apply.
|
|
15
|
+
- **`indexEntity(entity, options?)`** takes `{ preserveTimestamps?, suffix? }`
|
|
16
|
+
in place of the positional `suffix` string. `IndexEntityOptions` is
|
|
17
|
+
exported.
|
|
18
|
+
|
|
19
|
+
## Migration
|
|
20
|
+
|
|
21
|
+
- `indexEntity(entity, "#deleted")` becomes
|
|
22
|
+
`indexEntity(entity, { suffix: "#deleted" })`.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
---
|
|
2
|
+
version: 1.2.77
|
|
3
|
+
date: 2026-09-23
|
|
4
|
+
summary: dynamodb mocks accept preserveTimestamps and the indexEntity options object
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Changes
|
|
8
|
+
|
|
9
|
+
- `indexEntity` mock takes `IndexEntityOptions` (`{ preserveTimestamps?, suffix? }`).
|
|
10
|
+
- `createEntity` and `updateEntity` mocks pass `preserveTimestamps` through;
|
|
11
|
+
`transactWriteEntities` accepts it.
|
package/skills/dynamodb.md
CHANGED
|
@@ -114,7 +114,7 @@ interface StorableEntity {
|
|
|
114
114
|
|
|
115
115
|
// Timestamps (ISO 8601) — managed by indexEntity
|
|
116
116
|
createdAt?: string; // Backfilled on first write
|
|
117
|
-
updatedAt?: string; // Bumped on every write
|
|
117
|
+
updatedAt?: string; // Bumped on every write (kept with preserveTimestamps)
|
|
118
118
|
archivedAt?: string;
|
|
119
119
|
deletedAt?: string;
|
|
120
120
|
|
|
@@ -174,14 +174,23 @@ await destroyEntity({ id: "abc-123" });
|
|
|
174
174
|
|
|
175
175
|
| Function | Description |
|
|
176
176
|
|----------|-------------|
|
|
177
|
-
| `createEntity({ entity })` | Create entity; returns `null` if `id` exists (conditional `attribute_not_exists(id)`) |
|
|
177
|
+
| `createEntity({ entity, preserveTimestamps? })` | Create entity; returns `null` if `id` exists (conditional `attribute_not_exists(id)`) |
|
|
178
178
|
| `getEntity({ id })` | Get by primary key (id only) |
|
|
179
|
-
| `updateEntity({ entity, condition?, names?, values? })` | Update (sets `updatedAt`, re-indexes). Pass `condition` (a ConditionExpression, with `names`/`values` bindings) to guard the write; throws `ConflictError` (409) and leaves the item unchanged when the condition fails |
|
|
179
|
+
| `updateEntity({ entity, condition?, names?, preserveTimestamps?, values? })` | Update (sets `updatedAt`, re-indexes). Pass `condition` (a ConditionExpression, with `names`/`values` bindings) to guard the write; throws `ConflictError` (409) and leaves the item unchanged when the condition fails |
|
|
180
180
|
| `transitionEntity({ id, from?, set })` | Conditionally update by status: reads the entity, merges `set`, writes guarded by `#status = from`; throws `ConflictError` (409) on a race, `NotFoundError` (404) when absent. Validates `from`/`set.status` against the model's `status` vocabulary |
|
|
181
181
|
| `deleteEntity({ id })` | Soft delete (`deletedAt`, `#deleted` suffix on GSI pk) |
|
|
182
182
|
| `archiveEntity({ id })` | Archive (`archivedAt`, `#archived` suffix on GSI pk) |
|
|
183
183
|
| `destroyEntity({ id })` | Hard delete (permanent) |
|
|
184
|
-
| `transactWriteEntities({ entities, conditionalCreate?, condition? })` | Write many entities atomically; `conditionalCreate: true` guards every `Put` with `attribute_not_exists(id)` (`condition` for a custom expression), throwing `ConflictError` (409) when a conditional check fails |
|
|
184
|
+
| `transactWriteEntities({ entities, conditionalCreate?, condition?, preserveTimestamps? })` | Write many entities atomically; `conditionalCreate: true` guards every `Put` with `attribute_not_exists(id)` (`condition` for a custom expression), throwing `ConflictError` (409) when a conditional check fails |
|
|
185
|
+
|
|
186
|
+
### Preserving Timestamps (Imports)
|
|
187
|
+
|
|
188
|
+
Every write stamps `updatedAt` with the write time, and every `scope#updatedAt` sort key follows it. Migrations, restores, and replays pass `preserveTimestamps: true` to `createEntity`, `updateEntity`, `transactWriteEntities`, or `seedEntities` (as an option) to keep the entity's own `createdAt`/`updatedAt`. Missing values fall back to now. TTL handling, date serialization, and conditional-write error mapping still apply, so raw `PutCommand` workarounds are unnecessary.
|
|
189
|
+
|
|
190
|
+
```typescript
|
|
191
|
+
await createEntity({ entity: historicalMessage, preserveTimestamps: true });
|
|
192
|
+
await seedEntities(entities, { preserveTimestamps: true });
|
|
193
|
+
```
|
|
185
194
|
|
|
186
195
|
### Conditional Writes
|
|
187
196
|
|
|
@@ -428,6 +437,9 @@ await seedEntities(entities, { dryRun: true });
|
|
|
428
437
|
// Replace existing
|
|
429
438
|
await seedEntities(entities, { replace: true });
|
|
430
439
|
|
|
440
|
+
// Keep original createdAt/updatedAt (migrations, restores)
|
|
441
|
+
await seedEntities(entities, { preserveTimestamps: true });
|
|
442
|
+
|
|
431
443
|
// Export entities
|
|
432
444
|
const { entities, count } = await exportEntities("vocabulary", APEX);
|
|
433
445
|
|
|
@@ -647,7 +659,7 @@ initClient({ tableName: NEW }); // singleton → destination
|
|
|
647
659
|
await createTable({ tableName: NEW }); // new schema, waits ACTIVE
|
|
648
660
|
for await (const item of scanTable({ tableName: OLD })) {
|
|
649
661
|
const { sequence, pk, sk, ...rest } = item; // 0.4 → 0.6 transform
|
|
650
|
-
await updateEntity({ entity: rest });
|
|
662
|
+
await updateEntity({ entity: rest, preserveTimestamps: true }); // re-indexes, keeps timestamps
|
|
651
663
|
}
|
|
652
664
|
```
|
|
653
665
|
|