@namzu/bedrock 5.0.0 → 5.0.1
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 +12 -0
- package/README.md +44 -51
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 5.0.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 5394981: Make each driver's README an npm package page rather than its manual.
|
|
8
|
+
|
|
9
|
+
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.
|
|
10
|
+
|
|
11
|
+
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.
|
|
12
|
+
|
|
13
|
+
No API change.
|
|
14
|
+
|
|
3
15
|
## 5.0.0
|
|
4
16
|
|
|
5
17
|
### Major Changes
|
package/README.md
CHANGED
|
@@ -1,6 +1,36 @@
|
|
|
1
|
-
|
|
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
|
-
|
|
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
|
+
[](https://www.npmjs.com/package/@namzu/bedrock)
|
|
21
|
+
[](https://github.com/cogitave/namzu/actions/workflows/ci.yml)
|
|
22
|
+
[](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/
|
|
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
|
-
//
|
|
20
|
-
registerBedrock()
|
|
49
|
+
registerBedrock() // once, at startup
|
|
21
50
|
|
|
22
|
-
|
|
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-
|
|
41
|
-
messages: [{ role: 'user', content: '
|
|
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
|
-
|
|
48
|
-
|
|
49
|
-
|
|
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
|
-
##
|
|
68
|
+
## Documentation
|
|
77
69
|
|
|
78
|
-
|
|
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
|
|
75
|
+
FSL-1.1-MIT, converting to MIT two years after each release.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@namzu/bedrock",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.1",
|
|
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
6
|
"type": "module",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"@types/node": "^22.19.17",
|
|
55
55
|
"typescript": "^5.5.0",
|
|
56
56
|
"vitest": "^3.2.6",
|
|
57
|
-
"@namzu/sdk": "^
|
|
57
|
+
"@namzu/sdk": "^30.0.1"
|
|
58
58
|
},
|
|
59
59
|
"scripts": {
|
|
60
60
|
"build": "tsc --build",
|