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

@phala/aci-provider

v0.7.2

Published

Framework-neutral model provider for Attested Confidential Inference gateways

Downloads

1,962

Readme

@phala/aci-provider

Framework-neutral provider kernel for ACI gateways. It owns verified connection lifecycle, live model discovery, TEE-only filtering, model capability mapping, bounded receipt history, optional response-completion receipt verification, and content-addressed session inspection. It also exposes structured inspection results and a shared text formatter, so host adapters do not duplicate ACI audit semantics.

Host adapters such as Pi and OpenCode supply their native configuration and UI. Applications normally install a host adapter rather than this package directly. Shared RedPill and Phala Cloud profiles are exported from @phala/aci-provider/profiles. Phala Cloud's account API and device authorization flow are isolated under @phala/aci-provider/phala-cloud; they are not part of the ACI protocol or verifier.

import {
  createAciProvider,
  resolveAciProviderConfig,
  resolveAciProviderProfile,
} from "@phala/aci-provider";

const profile = resolveAciProviderProfile({
  defaultBaseURL: "https://gateway.example.com/v1",
});
const provider = createAciProvider(resolveAciProviderConfig(profile));

await provider.connect();
const response = await provider.fetch("https://gateway.example.com/v1/chat/completions", {
  method: "POST",
  headers: { Authorization: `Bearer ${process.env.ACI_API_KEY}` },
  body: JSON.stringify({ model: "model-id", messages: [] }),
});

The provider fails closed: model traffic is sent only after workload attestation and TLS SPKI binding succeed. Set receipts.verification to "response" to make a response stream finish or settle consumer cancellation only after its signed receipt and cited session have verified.

Model discovery uses the verified connection but sends no inference API key; the gateway's /v1/models catalog is public. Host adapters own credentials and attach them only to inference requests.

The catalog is authoritative. The provider maps reasoning and tools only from supported_features, and temperature only from supported_sampling_parameters. It does not infer capabilities, family, limits, modalities, or request dialects from model ids. Malformed required metadata fails discovery instead of being replaced with guessed defaults. Optional cache prices remain absent when the catalog omits them.

provider.receipts() returns the bounded in-process exchange history, newest first. provider.verifyReceipt() verifies the latest exchange when no id is given, while provider.verifySession(id) fetches the public session artifact over the pinned connection and validates its content address, API version, validity window, and evidence digest.

Host integrations can use one structured inspection contract for status, attestation, receipt history, receipt verification, and session verification:

import { formatAciInspection, inspectAciProvider } from "@phala/aci-provider";

const result = await inspectAciProvider(provider, { action: "receipt" });
console.log(formatAciInspection(result));

Products that exchange account authorization for an inference API key implement the host-neutral AccountApiKeyAuth contract. It describes the browser/device step and returns one API key plus optional metadata; host adapters present it and persist the result through native auth APIs. Phala Cloud provides the shared factory directly:

import { createPhalaCloudAccountAuth } from "@phala/aci-provider/phala-cloud";

const accountAuth = createPhalaCloudAccountAuth({
  baseURL: "https://cloud-api.phala.com",
  clientId: "my-agent",
});

This product authentication contract is separate from ACI verification. RedPill currently has no account authorization implementation and remains API-key-only.