@jaypie/mcp 0.8.61 → 0.8.63
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/suites/docs/index.js +1 -1
- package/package.json +1 -1
- package/release-notes/dynamodb/0.6.3.md +34 -0
- package/release-notes/errors/1.2.2.md +20 -0
- package/release-notes/jaypie/1.2.49.md +12 -0
- package/release-notes/mcp/0.8.62.md +14 -0
- package/release-notes/mcp/0.8.63.md +15 -0
- package/release-notes/testkit/1.2.40.md +18 -0
- package/skills/dynamodb.md +24 -0
- package/skills/errors.md +1 -0
|
@@ -9,7 +9,7 @@ import { gt } from 'semver';
|
|
|
9
9
|
/**
|
|
10
10
|
* Docs Suite - Documentation services (skill, version, release_notes)
|
|
11
11
|
*/
|
|
12
|
-
const BUILD_VERSION_STRING = "@jaypie/mcp@0.8.
|
|
12
|
+
const BUILD_VERSION_STRING = "@jaypie/mcp@0.8.63#4149aed3"
|
|
13
13
|
;
|
|
14
14
|
const __filename$1 = fileURLToPath(import.meta.url);
|
|
15
15
|
const __dirname$1 = path.dirname(__filename$1);
|
package/package.json
CHANGED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
---
|
|
2
|
+
version: 0.6.3
|
|
3
|
+
date: 2026-05-31
|
|
4
|
+
summary: transactWriteEntities supports conditional writes (conditionalCreate / condition) and throws ConflictError on a conditional-check failure
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Added
|
|
8
|
+
|
|
9
|
+
- **Conditional `transactWriteEntities`**. The transaction writer now accepts
|
|
10
|
+
two optional params so callers can express the canonical DynamoDB
|
|
11
|
+
uniqueness / atomic-create pattern in a single transaction:
|
|
12
|
+
|
|
13
|
+
- `conditionalCreate: true` guards **every** `Put` with
|
|
14
|
+
`attribute_not_exists(id)` — mirroring `createEntity` for the multi-item
|
|
15
|
+
case (e.g. writing an entity **and** its uniqueness-sentinel row atomically).
|
|
16
|
+
- `condition: string` supplies a custom `ConditionExpression` applied to
|
|
17
|
+
every `Put` (takes precedence over `conditionalCreate`).
|
|
18
|
+
|
|
19
|
+
```ts
|
|
20
|
+
await transactWriteEntities({
|
|
21
|
+
conditionalCreate: true, // attribute_not_exists(id) on every Put
|
|
22
|
+
entities: [organization, aliasLock],
|
|
23
|
+
});
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
- **Distinct conflict signal**. When a conditional write causes DynamoDB to
|
|
27
|
+
cancel the transaction (`ConditionalCheckFailed`), `transactWriteEntities`
|
|
28
|
+
now throws a `ConflictError` (409, from `@jaypie/errors`) instead of a raw
|
|
29
|
+
`TransactionCanceledException`, so callers can map the conflict to a 4xx.
|
|
30
|
+
Non-conditional cancellations propagate unchanged.
|
|
31
|
+
|
|
32
|
+
The default (no condition) remains an unconditional write — fully additive.
|
|
33
|
+
|
|
34
|
+
Issue: [#357](https://github.com/finlaysonstudio/jaypie/issues/357)
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
---
|
|
2
|
+
version: 1.2.2
|
|
3
|
+
date: 2026-05-31
|
|
4
|
+
summary: Add ConflictError (409) for uniqueness / state-conflict responses
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Added
|
|
8
|
+
|
|
9
|
+
- **`ConflictError` (409)**. Jaypie previously had no 409, so callers had to
|
|
10
|
+
reach for a generic `BadRequestError` (400) for uniqueness violations and
|
|
11
|
+
other state conflicts. `ConflictError` fills the gap and is wired into
|
|
12
|
+
`jaypieErrorFromStatus(409)`.
|
|
13
|
+
|
|
14
|
+
```ts
|
|
15
|
+
import { ConflictError } from "jaypie";
|
|
16
|
+
|
|
17
|
+
throw new ConflictError("Alias already claimed");
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Issue: [#357](https://github.com/finlaysonstudio/jaypie/issues/357)
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
---
|
|
2
|
+
version: 1.2.49
|
|
3
|
+
date: 2026-05-31
|
|
4
|
+
summary: Re-export the new ConflictError (409) via the @jaypie/errors 1.2.2 bump
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Changed
|
|
8
|
+
|
|
9
|
+
- Bumped `@jaypie/errors` to `^1.2.2`, so `ConflictError` (409) is now
|
|
10
|
+
available from the `jaypie` entrypoint.
|
|
11
|
+
|
|
12
|
+
Issue: [#357](https://github.com/finlaysonstudio/jaypie/issues/357)
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
---
|
|
2
|
+
version: 0.8.62
|
|
3
|
+
date: 2026-05-31
|
|
4
|
+
summary: Document conditional transactWriteEntities and ConflictError in the dynamodb and errors skills
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Changed
|
|
8
|
+
|
|
9
|
+
- **`dynamodb` skill** documents `transactWriteEntities`' new
|
|
10
|
+
`conditionalCreate` / `condition` params and the atomic conditional-write
|
|
11
|
+
pattern.
|
|
12
|
+
- **`errors` skill** lists the new `ConflictError` (409).
|
|
13
|
+
|
|
14
|
+
Issue: [#357](https://github.com/finlaysonstudio/jaypie/issues/357)
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
---
|
|
2
|
+
version: 0.8.63
|
|
3
|
+
date: 2026-05-31
|
|
4
|
+
summary: Fix the dynamodb skill's Atomic Conditional Writes example to import ConflictError from jaypie, not @jaypie/dynamodb
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Fixed
|
|
8
|
+
|
|
9
|
+
- **`dynamodb` skill**. The "Atomic Conditional Writes" example imported
|
|
10
|
+
`ConflictError` from `@jaypie/dynamodb`, which does not re-export it — the
|
|
11
|
+
import threw at runtime. `ConflictError` lives in `@jaypie/errors` (and the
|
|
12
|
+
`jaypie` umbrella); the example now imports it from `jaypie` while keeping
|
|
13
|
+
`transactWriteEntities` from `@jaypie/dynamodb`.
|
|
14
|
+
|
|
15
|
+
Issue: [#357](https://github.com/finlaysonstudio/jaypie/issues/357)
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
---
|
|
2
|
+
version: 1.2.40
|
|
3
|
+
date: 2026-05-31
|
|
4
|
+
summary: Mock the new ConflictError and the conditional transactWriteEntities signature
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Added
|
|
8
|
+
|
|
9
|
+
- **`ConflictError` mock**. Re-exported from `@jaypie/testkit/mock` and mapped
|
|
10
|
+
in the mocked `errorFromStatusCode(409)`, matching the new
|
|
11
|
+
`@jaypie/errors` export.
|
|
12
|
+
|
|
13
|
+
## Changed
|
|
14
|
+
|
|
15
|
+
- **`transactWriteEntities` mock signature** now accepts the optional
|
|
16
|
+
`conditionalCreate` and `condition` params added in `@jaypie/dynamodb` 0.6.3.
|
|
17
|
+
|
|
18
|
+
Issue: [#357](https://github.com/finlaysonstudio/jaypie/issues/357)
|
package/skills/dynamodb.md
CHANGED
|
@@ -175,6 +175,30 @@ await destroyEntity({ id: "abc-123" });
|
|
|
175
175
|
| `deleteEntity({ id })` | Soft delete (`deletedAt`, `#deleted` suffix on GSI pk) |
|
|
176
176
|
| `archiveEntity({ id })` | Archive (`archivedAt`, `#archived` suffix on GSI pk) |
|
|
177
177
|
| `destroyEntity({ id })` | Hard delete (permanent) |
|
|
178
|
+
| `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 |
|
|
179
|
+
|
|
180
|
+
### Atomic Conditional Writes
|
|
181
|
+
|
|
182
|
+
Use `conditionalCreate` to write an entity **and** a uniqueness-sentinel row in a single transaction -- both commit or neither does:
|
|
183
|
+
|
|
184
|
+
`ConflictError` is thrown from `@jaypie/errors` (re-exported by the `jaypie` umbrella); `@jaypie/dynamodb` does not re-export it.
|
|
185
|
+
|
|
186
|
+
```typescript
|
|
187
|
+
import { ConflictError } from "jaypie"; // or "@jaypie/errors"
|
|
188
|
+
import { transactWriteEntities } from "@jaypie/dynamodb";
|
|
189
|
+
|
|
190
|
+
try {
|
|
191
|
+
await transactWriteEntities({
|
|
192
|
+
conditionalCreate: true, // attribute_not_exists(id) on every Put
|
|
193
|
+
entities: [organization, aliasLock],
|
|
194
|
+
});
|
|
195
|
+
} catch (error) {
|
|
196
|
+
if (error instanceof ConflictError) {
|
|
197
|
+
// alias already claimed -- map to 409
|
|
198
|
+
}
|
|
199
|
+
throw error;
|
|
200
|
+
}
|
|
201
|
+
```
|
|
178
202
|
|
|
179
203
|
### Scope and Hierarchy
|
|
180
204
|
|
package/skills/errors.md
CHANGED
|
@@ -29,6 +29,7 @@ throw new ConfigurationError("Missing API key");
|
|
|
29
29
|
| UnauthorizedError | 401 | Authentication required |
|
|
30
30
|
| ForbiddenError | 403 | Authenticated but not permitted |
|
|
31
31
|
| NotFoundError | 404 | Resource doesn't exist |
|
|
32
|
+
| ConflictError | 409 | Request conflicts with current state (e.g. uniqueness violation) |
|
|
32
33
|
| ConfigurationError | 500 | Missing or invalid config |
|
|
33
34
|
| InternalError | 500 | Unexpected server error |
|
|
34
35
|
|