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

@concrete-security/private-ai-sdk

v0.1.1

Published

AI SDK provider with aTLS for Trusted Execution Environments

Readme

private-ai-sdk

An AI SDK provider that wraps any AI SDK (OpenAI, Anthropic, etc.) and replaces its HTTP transport with an attested TLS (aTLS) channel. This ensures the model you're talking to runs inside a verified Trusted Execution Environment (TEE).

Why

Standard HTTPS guarantees encryption in transit, but tells you nothing about where the server runs. A compromised or rogue server can decrypt your prompts.

aTLS solves this: before any data is exchanged, the server proves it runs inside a TEE by providing an attestation report. The client verifies this report against a policy (expected TEE measurements). If the attestation fails, the connection is rejected.

Who can use it

Any application built on Vercel's AI SDK — coding agents, chatbots, RAG pipelines, custom scripts — can use this provider as a drop-in replacement to get secure inference. If it uses @ai-sdk/*, it works with private-ai-sdk.

Currently used by:

  • secure-opencode — a fork of OpenCode that offers secure AI coding in the terminal.

How it works

Host app (e.g. opencode)
  │
  │  config: { sdk: "@ai-sdk/anthropic", policyFile: "./cvm_policy.json" }
  │
  ▼
private-ai-sdk
  │
  │  1. Loads the policy from file or config
  │  2. Loads the AI SDK dynamically from the host's node_modules
  │  3. Creates an aTLS-secured fetch (via @concrete-security/atlas-node)
  │  4. Returns the SDK provider with fetch replaced by aTLS fetch
  │
  ▼
AI model running inside a TEE

The host application sees a standard AI SDK provider — the aTLS layer is transparent.

Usage

Install

cd examples/private-ai-sdk
pnpm install
pnpm build   # compiles to dist/

Configuration

The provider is configured through the host application's config. Example with opencode (.opencode/opencode.jsonc):

{
  "provider": {
    "my-secure-provider": {
      "npm": "file:///path/to/atlas/examples/private-ai-sdk/dist/index.js",
      "api": "https://your-tee-endpoint.com/v1",
      "options": {
        "sdk": "@ai-sdk/anthropic",
        "policyFile": "/path/to/cvm_policy.json"
      },
      "models": {
        "my-model": { "id": "openai/model-name", "name": "My Secure Model" }
      }
    }
  }
}

Options

| Option | Required | Description | |--------|----------|-------------| | sdk | Yes | npm package name of the AI SDK (e.g. @ai-sdk/anthropic, @ai-sdk/openai-compatible) | | policyFile | Yes* | Absolute path to a JSON policy file describing the expected TEE configuration | | policy | Yes* | Alternative: pass the policy object directly instead of a file | | baseURL | Yes | URL of the AI API running inside the TEE | | target | No | Override aTLS target host:port (derived from baseURL by default) |

* One of policyFile or policy is required.

Tests

# Unit tests (no network)
ai-provider % cd examples/private-ai-sdk && node test/index.test.mjs