npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

opencode-aws-bedrock-auth

v0.3.1

Published

OpenCode plugin that automatically refreshes AWS Bedrock SSO sessions

Readme

opencode-aws-bedrock-auth

npm CI license

An OpenCode plugin that automatically refreshes your AWS Bedrock SSO session before it expires — so your AI sessions are never interrupted by auth errors.

How it works

  • On startup, reads your amazon-bedrock provider profile from opencode.json
  • Validates the current SSO session via aws sts get-caller-identity
  • If the session is expired, runs aws sso login --profile <profile> automatically
  • Re-checks every 20 minutes, throttled and deduplicated to avoid concurrent refresh races
  • Guards shell and subagent tool calls so they never run against an expired session
  • Exposes an aws_refresh_token tool for on-demand manual refresh

Installation

Add the package name to the plugins array in your opencode.json:

{
  "$schema": "https://opencode.ai/config.json",
  "plugins": ["opencode-aws-bedrock-auth"]
}

OpenCode will install and load it automatically at startup. No file copying required.

Configuration

Ensure you have an amazon-bedrock provider with a profile in your opencode.json:

{
  "$schema": "https://opencode.ai/config.json",
  "plugins": ["opencode-aws-bedrock-auth"],
  "providers": {
    "amazon-bedrock": {
      "settings": {
        "profile": "my-sso-profile"
      }
    }
  }
}

If no profile is configured, the plugin stays inactive and logs a warning.

Manual refresh

The plugin registers an aws_refresh_token tool that bypasses the 20-minute interval and forces an immediate session check. Ask the AI to run it whenever you want to refresh proactively:

"Please refresh my AWS token" "Run aws_refresh_token"

This is useful before kicking off a long operation, or after receiving an authentication error.

Requirements

Development

npm install
npm run build      # compile to dist/
npm run typecheck  # type-check only
npm run lint       # oxlint
npm run fmt        # oxfmt (writes)
npm run fmt:check  # oxfmt (CI check, no writes)

Releasing

Releases are published to npm from GitHub with trusted publishing (no npm token). The workflow is .github/workflows/release.yml.

npm version patch|minor|major -m "chore(release): %s"   # bumps package.json, commits, tags vX.Y.Z
git push --follow-tags
gh release create vX.Y.Z --generate-notes

Publishing the GitHub Release triggers the workflow, which checks that the tag matches package.json, runs lint, format check, typecheck and build, then runs npm publish. Mark the release as a pre-release to publish it under the next dist-tag instead of latest.

License

MIT