@namzu/bedrock 5.0.0 → 5.1.0

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.
Files changed (3) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/README.md +44 -51
  3. package/package.json +5 -2
package/CHANGELOG.md CHANGED
@@ -1,5 +1,31 @@
1
1
  # Changelog
2
2
 
3
+ ## 5.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 03e363c: Declare the Node floor these packages already had, and export a type `TelemetryConfig` already required.
8
+
9
+ **`engines.node: ">=20.0.0"`.** Only `@namzu/cli` declared one; the other fourteen published without any, so npm could not warn a consumer installing onto an unsupported runtime — they got a crash at some later import instead. The floor is not new: `@namzu/cli` has declared it since it shipped and `install.sh` has enforced it since it existed. This makes the other fourteen say the same thing.
10
+
11
+ If you install with `engine-strict=true` on Node 18, an install that previously emitted nothing will now fail. Upgrade to Node 20 or newer, which the code already assumed. Everyone else sees no change, or an `EBADENGINE` warning that replaces a later crash.
12
+
13
+ Worth stating plainly: CI verifies Node 22 and 24. The 20 floor is a declared minimum, not a tested one.
14
+
15
+ **`SpanProcessorLike` is now exported from `@namzu/telemetry`.** `TelemetryConfig.spanProcessors` takes `readonly SpanProcessorLike[]`, and the type had no export — a field on the public surface whose type was not on it, so a host supplying the value had to inline the shape or reach for `any`.
16
+
17
+ ## 5.0.1
18
+
19
+ ### Patch Changes
20
+
21
+ - 5394981: Make each driver's README an npm package page rather than its manual.
22
+
23
+ Every driver README carried its full reference — configuration tables, capability matrices, error surfaces — between 167 and 392 lines of it. That is a reasonable shape for a single-package repository, where the README _is_ the documentation, and the wrong one for a package in a monorepo that has a `docs/` tree: it duplicates what the docs say, and nothing checks that the two agree.
24
+
25
+ The README is now what a reader needs in the first minute — what the driver is, install, one working example, links. The reference moved to `docs/providers/<name>.md`, whole, and its code samples are now compiled against the built SDK by the doc-fence gate on every CI run. They never were before; several did not compile.
26
+
27
+ No API change.
28
+
3
29
  ## 5.0.0
4
30
 
5
31
  ### Major Changes
package/README.md CHANGED
@@ -1,6 +1,36 @@
1
- # @namzu/bedrock
1
+ <!-- okf
2
+ type: Reference
3
+ title: "@namzu/bedrock"
4
+ description: >-
5
+ Implements the kernel's `LLMProvider` interface over AWS Bedrock, carrying
6
+ the region and credential semantics natively rather than as a base-URL
7
+ override.
8
+ tags: [readme, package, provider, bedrock]
9
+ timestamp: 2026-08-17T00:00:00Z
10
+ status: active
11
+ diataxis: reference
12
+ -->
2
13
 
3
- AWS Bedrock LLM provider for [`@namzu/sdk`](https://www.npmjs.com/package/@namzu/sdk). Thin wrapper around `@aws-sdk/client-bedrock-runtime` exposing Bedrock's **Converse API** (chat + streaming) with full tool-use support, conformant to the `LLMProvider` contract.
14
+ <div align="center">
15
+
16
+ <h1>@namzu/bedrock</h1>
17
+
18
+ **The Bedrock model driver for [Namzu](https://github.com/cogitave/namzu).**
19
+
20
+ [![npm](https://img.shields.io/npm/v/@namzu/bedrock.svg)](https://www.npmjs.com/package/@namzu/bedrock)
21
+ [![build](https://github.com/cogitave/namzu/actions/workflows/ci.yml/badge.svg)](https://github.com/cogitave/namzu/actions/workflows/ci.yml)
22
+ [![license](https://img.shields.io/badge/license-FSL--1.1--MIT-blue.svg)](https://github.com/cogitave/namzu/blob/main/LICENSE.md)
23
+
24
+ [Install](#install) · [Usage](#usage) · [Documentation](#documentation)
25
+
26
+ </div>
27
+
28
+ ---
29
+
30
+ Implements the kernel's `LLMProvider` interface over AWS Bedrock, carrying
31
+ the region and credential semantics natively rather than as a base-URL
32
+ override. Installed only if you use it — the kernel has no preferred vendor
33
+ and no driver is a dependency of it.
4
34
 
5
35
  ## Install
6
36
 
@@ -8,7 +38,7 @@ AWS Bedrock LLM provider for [`@namzu/sdk`](https://www.npmjs.com/package/@namzu
8
38
  pnpm add @namzu/sdk @namzu/bedrock
9
39
  ```
10
40
 
11
- `@namzu/bedrock` declares `@namzu/sdk` as a peer dependency. Install both.
41
+ `@namzu/sdk` is a peer dependency. Install both.
12
42
 
13
43
  ## Usage
14
44
 
@@ -16,67 +46,30 @@ pnpm add @namzu/sdk @namzu/bedrock
16
46
  import { ProviderRegistry } from '@namzu/sdk'
17
47
  import { registerBedrock } from '@namzu/bedrock'
18
48
 
19
- // Register once at app startup.
20
- registerBedrock()
49
+ registerBedrock() // once, at startup
21
50
 
22
- // Fully typed via module augmentation: ProviderConfigRegistry['bedrock'].
23
- const { provider, capabilities } = ProviderRegistry.create({
51
+ const { provider } = ProviderRegistry.create({
24
52
  type: 'bedrock',
25
53
  region: 'us-east-1',
26
- accessKeyId: process.env.AWS_ACCESS_KEY_ID!,
27
- secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY!,
28
54
  })
29
55
 
30
- const response = await provider.chat({
31
- model: 'anthropic.claude-sonnet-4-20250514',
32
- messages: [{ role: 'user', content: 'Hello' }],
33
- })
34
- ```
35
-
36
- Streaming:
37
-
38
- ```ts
39
56
  for await (const chunk of provider.chatStream({
40
- model: 'anthropic.claude-sonnet-4-20250514',
41
- messages: [{ role: 'user', content: 'Tell me a story' }],
57
+ model: 'us.anthropic.claude-sonnet-4-5-20250929-v1:0',
58
+ messages: [{ role: 'user', content: 'Hello' }],
42
59
  })) {
43
60
  if (chunk.delta.content) process.stdout.write(chunk.delta.content)
44
61
  }
45
62
  ```
46
63
 
47
- ## Authentication
48
-
49
- Credentials resolve in this order:
50
-
51
- 1. Explicit `accessKeyId` + `secretAccessKey` (+ optional `sessionToken`) on the config object.
52
- 2. AWS SDK default credential chain — environment variables (`AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, `AWS_SESSION_TOKEN`), shared config/credentials files (`~/.aws/credentials`), IAM role (EC2/ECS/Lambda), SSO profiles.
53
-
54
- If you pass neither, the SDK's default chain runs — useful for EC2/ECS/Lambda where the instance role provides credentials automatically.
55
-
56
- ### Region
57
-
58
- Either set `region` on the config or rely on `AWS_REGION` / `AWS_DEFAULT_REGION` env var. Bedrock is region-scoped; Claude and Nova models are available in different regions. See [AWS Bedrock model regions](https://docs.aws.amazon.com/bedrock/latest/userguide/models-regions.html).
59
-
60
- ### Model access
61
-
62
- Bedrock requires explicit model access enablement in the AWS console. Enable the models you plan to call at **AWS Console → Bedrock → Model access → Enable specific models**.
63
-
64
- ## Capabilities
65
-
66
- ```ts
67
- import { BEDROCK_CAPABILITIES } from '@namzu/bedrock'
68
-
69
- // {
70
- // supportsTools: true,
71
- // supportsStreaming: true,
72
- // supportsFunctionCalling: true,
73
- // }
74
- ```
64
+ `chatStream` is the only model entry point; a non-streaming call is that
65
+ stream collected. In practice the kernel's run loop calls it and hands you
66
+ events.
75
67
 
76
- ## Observability
68
+ ## Documentation
77
69
 
78
- This package ships without observability hooks in `0.1.x`. OpenTelemetry span emission and structured logging are roadmapped for the forthcoming `@namzu/telemetry` package — a separate opt-in dependency that wraps any `LLMProvider` to emit GenAI semantic-convention spans. Track progress in the [Namzu roadmap](https://github.com/cogitave/namzu).
70
+ - [The AWS Bedrock driver — model ids, credentials and prompt caching](https://github.com/cogitave/namzu/blob/main/docs/providers/bedrock.md)
71
+ - [Namzu docs](https://github.com/cogitave/namzu/tree/main/docs)
79
72
 
80
73
  ## License
81
74
 
82
- FSL-1.1-MIT. Same as `@namzu/sdk`.
75
+ FSL-1.1-MIT, converting to MIT two years after each release.
package/package.json CHANGED
@@ -1,8 +1,11 @@
1
1
  {
2
2
  "name": "@namzu/bedrock",
3
- "version": "5.0.0",
3
+ "version": "5.1.0",
4
4
  "description": "AWS Bedrock LLM provider for @namzu/sdk. Provides Converse API (chat + streaming) with full tool-use support.",
5
5
  "license": "FSL-1.1-MIT",
6
+ "engines": {
7
+ "node": ">=20.0.0"
8
+ },
6
9
  "type": "module",
7
10
  "homepage": "https://github.com/cogitave/namzu#readme",
8
11
  "repository": {
@@ -54,7 +57,7 @@
54
57
  "@types/node": "^22.19.17",
55
58
  "typescript": "^5.5.0",
56
59
  "vitest": "^3.2.6",
57
- "@namzu/sdk": "^26.0.0"
60
+ "@namzu/sdk": "^30.1.0"
58
61
  },
59
62
  "scripts": {
60
63
  "build": "tsc --build",