@plumbus/ai-bedrock 0.2.0 → 0.2.2
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/CHANGELOG.md +17 -1
- package/README.md +3 -7
- package/dist/.tsbuildinfo +1 -1
- package/dist/bedrock-adapter.d.ts.map +1 -1
- package/dist/bedrock-adapter.js +104 -6
- package/dist/bedrock-adapter.js.map +1 -1
- package/instructions/framework.md +7 -4
- package/package.json +3 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,10 +1,26 @@
|
|
|
1
1
|
# @plumbus/ai-bedrock
|
|
2
2
|
|
|
3
|
+
## 0.2.2 — 2026-10-08
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
|
|
7
|
+
- Prompt caching on Converse / ConverseStream (#63). When a request sets `cache` (core 0.7.9+ passes it from `ctx.ai`, `runToolLoop`, and `AI_PROMPT_CACHE`), the adapter appends `cachePoint` after the system text, at the end of `toolConfig.tools`, and on the last message when requested. Only Claude model ids get marks, with or without an inference-profile prefix (`us.`, `jp.`, `us-gov.`, …); a model ARN gets none. Claude 3 Haiku, Claude 3 Sonnet, Claude 3 Opus, and Claude 3.5 Sonnet `20240620` get no marks because Bedrock rejects `cachePoint` for them with a ValidationException, and neither does Claude 3.5 Sonnet v2 (`20241022`), whose explicit caching AWS lists as Preview; other model families get none either, so those requests still succeed.
|
|
8
|
+
|
|
9
|
+
### Compatibility
|
|
10
|
+
|
|
11
|
+
- Loads and runs on any core 0.7.x. The `cache` option is resolved inside this package, which imports nothing from `@plumbus/core` that 0.7.0 lacks. On cores before 0.7.9, `ctx.ai` never sets `cache`, so requests are unchanged. The peer range stays `0.7.x`.
|
|
12
|
+
|
|
13
|
+
## 0.2.1 — 2026-09-10
|
|
14
|
+
|
|
15
|
+
### Fixed
|
|
16
|
+
|
|
17
|
+
- Publish the corrected package README without the added “Release family” banner, using normal `latest` publication. Runtime behavior and peer dependencies are unchanged from 0.2.0.
|
|
18
|
+
|
|
3
19
|
## 0.2.0 — 2026-09-10
|
|
4
20
|
|
|
5
21
|
### Upgrade boundary
|
|
6
22
|
|
|
7
|
-
- This release is an explicit minor-line upgrade. Previous caret ranges exclude it; install the coordinated core 0.7.x family and follow the [migration checklist](../../docs/upgrading-security-release.md). Packages
|
|
23
|
+
- This release is an explicit minor-line upgrade. Previous caret ranges exclude it; install the coordinated core 0.7.x family and follow the [migration checklist](../../docs/upgrading-security-release.md). Packages publish to npm’s default `latest` dist-tag.
|
|
8
24
|
|
|
9
25
|
### Agent instructions
|
|
10
26
|
|
package/README.md
CHANGED
|
@@ -1,10 +1,5 @@
|
|
|
1
1
|
# @plumbus/ai-bedrock
|
|
2
2
|
|
|
3
|
-
## Release family 0.2.0
|
|
4
|
-
|
|
5
|
-
This package requires an explicit upgrade from its previous minor line. Current Plumbus peers: `@plumbus/core` `0.7.x`. Install the matching versions of all Plumbus packages the app uses; do not bypass peer checks with `--force` or `--legacy-peer-deps`. Historical feature floors below describe earlier releases, not compatibility with this new family. Packages stage under `next`; read the core `instructions/upgrading-security-release.md` checklist and refresh agent wiring with `plumbus init --patch` (v16).
|
|
6
|
-
|
|
7
|
-
|
|
8
3
|
> **Amazon Bedrock for [Plumbus](https://github.com/plumbus-framework/plumbus) AI.** Optional AWS SDK adapter for Converse chat, ConverseStream, Titan embeddings, and **package-owned USD cost** from the AWS Price List (or a mounted pricing file).
|
|
9
4
|
|
|
10
5
|
[](https://www.npmjs.com/package/@plumbus/ai-bedrock)
|
|
@@ -51,7 +46,7 @@ An opt-in peer keeps core lean while giving AWS shops a first-class `provider: '
|
|
|
51
46
|
|
|
52
47
|
## Status
|
|
53
48
|
|
|
54
|
-
Optional peer of `@plumbus/core` (version-locked **`0.2.x`**; required peer `@plumbus/core` **`0.7.x`**). **Runtime floor:** `@plumbus/core` **≥ 0.
|
|
49
|
+
Optional peer of `@plumbus/core` (version-locked **`0.2.x`**; required peer `@plumbus/core` **`0.7.x`**). **Runtime floor:** `@plumbus/core` **≥ 0.7.0**; prompt caching through `ctx.ai` needs **≥ 0.7.9**. Install alone is not enough until the adapter is registered (env discovery or `createBedrockAdapter`).
|
|
55
50
|
|
|
56
51
|
## Install
|
|
57
52
|
|
|
@@ -134,11 +129,12 @@ Full curl, normalize script, ConfigMap sketch: **[instructions/pricing.md](./ins
|
|
|
134
129
|
- **Model access** — Converse fails with `AccessDenied` until the account enables the model (and Anthropic use-case forms where required).
|
|
135
130
|
- **Embeddings** — Converse does not embed; use InvokeModel (Titan) via `createRAGPipeline({ provider })` + `ctx.ai.retrieve` / `ragPipeline.ingest`. There is no `ctx.ai.embed`. `plumbus rag ingest` does not auto-select Bedrock. Mantle typically has no embeddings.
|
|
136
131
|
- **Tools** — use `runToolLoop` / `generateWithUsage({ tools })`; do not call the Bedrock SDK. Stream accumulates partial tool JSON. Parallel tool results are coalesced into the single user turn Converse requires.
|
|
132
|
+
- **Prompt caching** — set `cache` on `ctx.ai.*` / `runToolLoop`, or `AI_PROMPT_CACHE=true` (core ≥ 0.7.9). Claude models get Converse `cachePoint` marks, except Claude 3 Haiku / Sonnet / Opus and Claude 3.5 Sonnet `20240620`, which reject them, and Claude 3.5 Sonnet v2 (Preview-only on Bedrock); other families get none.
|
|
137
133
|
- **`toolChoice: 'none'`** — Bedrock has no true none; Plumbus omits `toolConfig` entirely. `'auto'` omits just the `toolChoice` field (model-dependent support).
|
|
138
134
|
- **Missing pricing file** — file mode throws on first call; auto-download failure warns, leaves cost unknown, and backs off 5 minutes before retrying.
|
|
139
135
|
- **Unmapped / unkeyed models** — inference works; **no `cost` field** is set until the pricing file has an explicit family-key row (auto-download is best-effort, not a complete AWS catalog). Core then falls back to its own catalog rather than recording the call as free.
|
|
140
136
|
- **IAM** — Converse itself requires `bedrock:InvokeModel`; do not scope that action to embedding models only.
|
|
141
|
-
- **Wiring** — after install, `plumbus init --patch` (core
|
|
137
|
+
- **Wiring** — after install, `plumbus init --patch` (wiring v13+, any core 0.7.x) so agents see `instructions/`.
|
|
142
138
|
|
|
143
139
|
## Documentation / Agent recipes
|
|
144
140
|
|