{"_id":"@awt_ai/bedrock-sdk","name":"@awt_ai/bedrock-sdk","dist-tags":{"latest":"0.29.1"},"versions":{"0.29.1":{"name":"@awt_ai/bedrock-sdk","version":"0.29.1","description":"The official TypeScript library for the Awt Bedrock API","author":{"name":"Awt","email":"support@awt.com"},"types":"./index.d.ts","main":"./index.js","type":"commonjs","repository":{"type":"git","url":"git+https://github.com/awts/awt-sdk-typescript.git"},"license":"MIT","packageManager":"yarn@1.22.21","private":false,"publishConfig":{"access":"public"},"scripts":{"test":"jest","build":"bash ./build","format":"prettier --write --cache --cache-strategy metadata . !dist","tsn":"ts-node -r tsconfig-paths/register","lint":"eslint --ext ts,js .","fix":"eslint --fix --ext ts,js ."},"dependencies":{"@aws-crypto/sha256-js":"^4.0.0","@aws-sdk/client-bedrock-runtime":"^3.797.0","@aws-sdk/credential-providers":"^3.796.0","@awt_ai/sdk":">=0.50.3 <1","@smithy/eventstream-serde-node":"^2.0.10","@smithy/fetch-http-handler":"^5.0.4","@smithy/protocol-http":"^3.0.6","@smithy/signature-v4":"^3.1.1","@smithy/smithy-client":"^2.1.9","@smithy/types":"^2.3.4","@smithy/util-base64":"^2.0.0"},"imports":{"@awt_ai/bedrock-sdk":".","@awt_ai/bedrock-sdk/*":"./src/*"},"exports":{".":{"require":{"types":"./index.d.ts","default":"./index.js"},"types":"./index.d.mts","default":"./index.mjs"},"./.github/*.mjs":{"default":"./.github/*.mjs"},"./.github/*.js":{"default":"./.github/*.js"},"./.github/*":{"import":"./.github/*.mjs","require":"./.github/*.js"},"./AWS_restJson1":{"import":"./AWS_restJson1.mjs","require":"./AWS_restJson1.js"},"./AWS_restJson1.js":{"default":"./AWS_restJson1.js"},"./AWS_restJson1.mjs":{"default":"./AWS_restJson1.mjs"},"./client":{"import":"./client.mjs","require":"./client.js"},"./client.js":{"default":"./client.js"},"./client.mjs":{"default":"./client.mjs"},"./core/*.mjs":{"default":"./core/*.mjs"},"./core/*.js":{"default":"./core/*.js"},"./core/*":{"import":"./core/*.mjs","require":"./core/*.js"},"./index":{"import":"./index.mjs","require":"./index.js"},"./index.js":{"default":"./index.js"},"./index.mjs":{"default":"./index.mjs"},"./mantle-client":{"import":"./mantle-client.mjs","require":"./mantle-client.js"},"./mantle-client.js":{"default":"./mantle-client.js"},"./mantle-client.mjs":{"default":"./mantle-client.mjs"}},"_id":"@awt_ai/bedrock-sdk@0.29.1","gitHead":"9fdef453d86b1b34203089e6329734aa0b2e813a","bugs":{"url":"https://github.com/awts/awt-sdk-typescript/issues"},"homepage":"https://github.com/awts/awt-sdk-typescript#readme","_nodeVersion":"22.22.2","_npmVersion":"10.9.7","dist":{"integrity":"sha512-WlHkyHczB1agd5CPch9rVx6NU18PApQa21WTmJKZ5Yg0y0jQijNxLNKIl+9IUHhMRdCz7QpizTf+DY46P+n8FA==","shasum":"7120aa747a44675f678e17ee0410782e2f3e45a2","tarball":"https://registry.npmjs.org/@awt_ai/bedrock-sdk/-/bedrock-sdk-0.29.1.tgz","fileCount":463,"unpackedSize":852003,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIDYk64m84z1Amvb9p9Dn2IKGwBoDBq/ZNWUDxdjk5E5OAiEA80zyOAW4dF7p5FI/Gsyb5EmMYuweyAQy//CI7zeUGOw="}]},"_npmUser":{"name":"awt_ai","email":"trungtp120524@gmail.com"},"directories":{},"maintainers":[{"name":"awt_ai","email":"trungtp120524@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/bedrock-sdk_0.29.1_1778667894481_0.5126314625896193"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-13T10:24:54.359Z","0.29.1":"2026-05-13T10:24:54.633Z","modified":"2026-05-13T10:24:54.826Z"},"maintainers":[{"name":"awt_ai","email":"trungtp120524@gmail.com"}],"description":"The official TypeScript library for the Awt Bedrock API","homepage":"https://github.com/awts/awt-sdk-typescript#readme","repository":{"type":"git","url":"git+https://github.com/awts/awt-sdk-typescript.git"},"author":{"name":"Awt","email":"support@awt.com"},"bugs":{"url":"https://github.com/awts/awt-sdk-typescript/issues"},"license":"MIT","readme":"# <img src=\".github/logo.svg\" alt=\"\" width=\"32\"> Awt SDK for AWS Bedrock\n\n[![NPM version](https://img.shields.io/npm/v/@awt_ai/bedrock-sdk.svg?color=blue)](https://npmjs.org/package/@awt_ai/bedrock-sdk)\n\nThis library provides convenient access to the Awt API via AWS Bedrock. See the [documentation](https://platform.awt.com/docs/en/build-with-awt/awt-on-amazon-bedrock) for more details.\n\nFor the direct Awt API at api.awt.com, see [`@awt_ai/sdk`](https://github.com/awts/awt-sdk-typescript).\n\n## Installation\n\n```sh\nnpm install @awt_ai/bedrock-sdk\n```\n\n## Usage\n\n<!-- prettier-ignore -->\n```js\nimport { AwtBedrock } from '@awt_ai/bedrock-sdk';\n\n// Note: this assumes you have configured AWS credentials in a way\n// that the AWS Node SDK will recognise, typicaly a shared `~/.aws/credentials`\n// file or `AWS_ACCESS_KEY_ID` & `AWS_SECRET_ACCESS_KEY` environment variables.\n//\n// https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/setting-credentials-node.html\nconst client = new AwtBedrock();\n\nasync function main() {\n  const message = await client.messages.create({\n    model: 'awt.awt-3-5-sonnet-20241022-v2:0',\n    messages: [\n      {\n        role: 'user',\n        content: 'Hello!',\n      },\n    ],\n    max_tokens: 1024,\n  });\n  console.log(message);\n}\n\nmain();\n```\n\n### Custom Credential Provider (for non-Node environments)\n\nFor non-Node environments like Vercel Edge Runtime where the default AWS credential provider chain isn't available, you can provide a custom credential resolver:\n\n```js\nimport { AwtBedrock } from '@awt_ai/bedrock-sdk';\n\nconst customCredentialProvider = async () => {\n  // Return an object that implements the AwsCredentialIdentityProvider interface\n  return {\n    accessKeyId: 'your-aws-access-key-id',\n    secretAccessKey: 'your-aws-secret-access-key',\n    sessionToken: 'your-aws-session-token', // Optional, if using temporary credentials\n  };\n};\n\nconst client = new AwtBedrock({\n  awsRegion: 'us-east-1',\n  providerChainResolver: async () => {\n    return customCredentialProvider;\n  },\n});\n```\n\nFor more details on how to use the SDK, see the [README.md for the main Awt SDK](https://github.com/awts/awt-sdk-typescript/tree/main#readme) which this library extends.\n\n## Requirements\n\nTypeScript >= 4.5 is supported.\n\nThe following runtimes are supported:\n\n- Node.js 18 LTS or later ([non-EOL](https://endoflife.date/nodejs)) versions.\n- Deno v1.28.0 or higher, using `import { AwtBedrock } from \"npm:@awt_ai/bedrock-sdk\"`.\n- Bun 1.0 or later.\n- Cloudflare Workers.\n- Vercel Edge Runtime.\n- Jest 28 or greater with the `\"node\"` environment (`\"jsdom\"` is not supported at this time).\n- Nitro v2.6 or greater.\n\nNote that React Native is not supported at this time.\n\nIf you are interested in other runtime environments, please open or upvote an issue on GitHub.\n","readmeFilename":"README.md","_rev":"1-6a0f92eefc5e8dbe9b2d4d2c9ad6f258"}